XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
aunet.h File Reference
#include <stdint.h>
#include <aurora.h>
#include <Fs\vfs.h>
Include dependency graph for aunet.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _netdev_
 

Macros

#define NETDEV_TYPE_ETHERNET   1
 
#define NETDEV_TYPE_802_11   2
 
#define NETDEV_TYPE_BLUETOOTH   3
 
#define htonl(l)   ((((l) & 0xFF) << 24) | (((l) & 0xFF00) << 8) | (((l) & 0xFF0000) >> 8) | (((l) & 0xFF000000) >> 24))
 
#define htons(s)   ((((s) & 0xFF) << 8) | (((s) & 0xFF00) >> 8))
 
#define ntohl(l)   htonl((l))
 
#define ntohs(s)   htons((s))
 
#define AUNET_GET_HARDWARE_ADDRESS   0x100
 
#define AUNET_SET_IPV4_ADDRESS   0x101
 
#define AUNET_GET_IPV4_ADDRESS   0x102
 
#define AUNET_GET_GATEWAY_ADDRESS   0x103
 
#define AUNET_SET_GATEWAY_ADDRESS   0x104
 
#define AUNET_GET_SUBNET_MASK   0x105
 
#define AUNET_SET_SUBNET_MASK   0x106
 
#define AUNET_GET_LINK_STATUS   0x107
 

Typedefs

typedef struct _netdev_ AuNetworkDevice
 

Functions

void AuInitialiseNet ()
 
AU_EXTERN AU_EXPORT void AuAddNetAdapter (AuVFSNode *netfs, char *name)
 
AU_EXTERN AU_EXPORT AuVFSNodeAuGetNetworkAdapter (char *name)
 
AuVFSNodeAuNetworkRoute (uint32_t address)
 

Macro Definition Documentation

◆ AUNET_GET_GATEWAY_ADDRESS

#define AUNET_GET_GATEWAY_ADDRESS   0x103

◆ AUNET_GET_HARDWARE_ADDRESS

#define AUNET_GET_HARDWARE_ADDRESS   0x100

◆ AUNET_GET_IPV4_ADDRESS

#define AUNET_GET_IPV4_ADDRESS   0x102

◆ AUNET_GET_LINK_STATUS

#define AUNET_GET_LINK_STATUS   0x107

◆ AUNET_GET_SUBNET_MASK

#define AUNET_GET_SUBNET_MASK   0x105

◆ AUNET_SET_GATEWAY_ADDRESS

#define AUNET_SET_GATEWAY_ADDRESS   0x104

◆ AUNET_SET_IPV4_ADDRESS

#define AUNET_SET_IPV4_ADDRESS   0x101

◆ AUNET_SET_SUBNET_MASK

#define AUNET_SET_SUBNET_MASK   0x106

◆ htonl

#define htonl (   l)    ((((l) & 0xFF) << 24) | (((l) & 0xFF00) << 8) | (((l) & 0xFF0000) >> 8) | (((l) & 0xFF000000) >> 24))

◆ htons

#define htons (   s)    ((((s) & 0xFF) << 8) | (((s) & 0xFF00) >> 8))

◆ NETDEV_TYPE_802_11

#define NETDEV_TYPE_802_11   2

◆ NETDEV_TYPE_BLUETOOTH

#define NETDEV_TYPE_BLUETOOTH   3

◆ NETDEV_TYPE_ETHERNET

#define NETDEV_TYPE_ETHERNET   1

BSD 2-Clause License

Copyright (c) 2022-2023, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ ntohl

#define ntohl (   l)    htonl((l))

◆ ntohs

#define ntohs (   s)    htons((s))

Typedef Documentation

◆ AuNetworkDevice

typedef struct _netdev_ AuNetworkDevice

Function Documentation

◆ AuAddNetAdapter()

AU_EXTERN AU_EXPORT void AuAddNetAdapter ( AuVFSNode netfs,
char *  name 
)

◆ AuGetNetworkAdapter()

AU_EXTERN AU_EXPORT AuVFSNode * AuGetNetworkAdapter ( char *  name)

◆ AuInitialiseNet()

void AuInitialiseNet ( )
extern

◆ AuNetworkRoute()

AuVFSNode * AuNetworkRoute ( uint32_t  address)
extern