PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
netman.h File Reference
#include <tamtypes.h>
+ Include dependency graph for netman.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  NetManNetProtStack
 
struct  NetManEthRuntimeStats
 
struct  NetManEthStatus
 
struct  NetManNetIF
 

Macros

#define NETMAN_NETIF_NAME_MAX_LEN   4
 
#define NETMAN_NETIF_FRAME_SIZE   1514
 
#define NETMAN_FRAME_GROUP_SIZE   8
 
#define NETMAN_NETIF_ETH_LINK_DISABLE_PAUSE   0x40
 
#define NETMAN_NETIF_IN_USE   0x80
 
#define NETMAN_NETIF_ETHERNET   1
 
#define NETMAN_NETIF_DIALUP   2
 
#define NETMAN_NETIF_LINK_UP   4
 
#define NETMAN_NETIF_EVF_UP   0x01
 
#define NETMAN_NETIF_EVF_DOWN   0x02
 
#define NETMAN_MAX_NETIF_COUNT   2
 

Enumerations

enum  NETMAN_NETIF_ETH_LINK_MODE {
  NETMAN_NETIF_ETH_LINK_MODE_AUTO = 0 , NETMAN_NETIF_ETH_LINK_MODE_10M_HDX , NETMAN_NETIF_ETH_LINK_MODE_10M_FDX , NETMAN_NETIF_ETH_LINK_MODE_100M_HDX ,
  NETMAN_NETIF_ETH_LINK_MODE_100M_FDX , NETMAN_NETIF_ETH_LINK_MODE_COUNT
}
 
enum  NETMAN_NETIF_ETH_LINK_STATE { NETMAN_NETIF_ETH_LINK_STATE_DOWN = 0 , NETMAN_NETIF_ETH_LINK_STATE_UP }
 
enum  NETMAN_NETIF_IOCTL_CODES {
  NETMAN_NETIF_IOCTL_ETH_GET_MAC = 0x1000 , NETMAN_NETIF_IOCTL_ETH_GET_LINK_MODE , NETMAN_NETIF_IOCTL_ETH_GET_RX_EOVERRUN_CNT , NETMAN_NETIF_IOCTL_ETH_GET_RX_EBADLEN_CNT ,
  NETMAN_NETIF_IOCTL_ETH_GET_RX_EBADFCS_CNT , NETMAN_NETIF_IOCTL_ETH_GET_RX_EBADALIGN_CNT , NETMAN_NETIF_IOCTL_ETH_GET_TX_ELOSSCR_CNT , NETMAN_NETIF_IOCTL_ETH_GET_TX_EEDEFER_CNT ,
  NETMAN_NETIF_IOCTL_ETH_GET_TX_ECOLL_CNT , NETMAN_NETIF_IOCTL_ETH_GET_TX_EUNDERRUN_CNT , NETMAN_NETIF_IOCTL_ETH_GET_STATUS , NETMAN_NETIF_IOCTL_ETH_SET_LINK_MODE ,
  NETMAN_NETIF_IOCTL_GET_LINK_STATUS = 0x3000 , NETMAN_NETIF_IOCTL_GET_TX_DROPPED_COUNT , NETMAN_NETIF_IOCTL_GET_RX_DROPPED_COUNT
}
 

Functions

int NetManGetGlobalNetIFLinkState (void)
 
int NetManSetMainIF (const char *name)
 
int NetManQueryMainIF (char *name)
 
int NetManRegisterNetworkStack (const struct NetManNetProtStack *stack)
 
void NetManUnregisterNetworkStack (void)
 
int NetManIoctl (unsigned int command, void *args, unsigned int args_len, void *output, unsigned int length)
 
int NetManSetLinkMode (int mode)
 
void NetManNetIFXmit (void)
 
void * NetManNetProtStackAllocRxPacket (unsigned int length, void **payload)
 
void NetManNetProtStackFreeRxPacket (void *packet)
 
void NetManNetProtStackEnQRxPacket (void *packet)
 
int NetManTxPacketNext (void **payload)
 
void NetManTxPacketDeQ (void)
 
int NetManTxPacketAfter (void **payload)
 
void NetManNetProtStackReallocRxPacket (void *packet, unsigned int length)
 
int NetManRegisterNetIF (struct NetManNetIF *NetIF)
 
void NetManUnregisterNetIF (const char *name)
 
void NetManToggleNetIFLinkState (int NetIFID, unsigned char state)
 

Detailed Description

Netman common definitions

Definition in file netman.h.


Data Structure Documentation

◆ NetManEthRuntimeStats

struct NetManEthRuntimeStats

Definition at line 29 of file netman.h.

Data Fields
u32 RxDroppedFrameCount
u32 RxErrorCount
u16 RxFrameOverrunCount
u16 RxFrameBadLengthCount
u16 RxFrameBadFCSCount
u16 RxFrameBadAlignmentCount
u32 TxDroppedFrameCount
u32 TxErrorCount
u16 TxFrameLOSSCRCount
u16 TxFrameEDEFERCount
u16 TxFrameCollisionCount
u16 TxFrameUnderrunCount
u16 RxAllocFail

◆ NetManEthStatus

struct NetManEthStatus

Definition at line 46 of file netman.h.

+ Collaboration diagram for NetManEthStatus:
Data Fields
u8 LinkStatus
u8 LinkMode
struct NetManEthRuntimeStats stats

Macro Definition Documentation

◆ NETMAN_NETIF_NAME_MAX_LEN

#define NETMAN_NETIF_NAME_MAX_LEN   4

Definition at line 12 of file netman.h.

◆ NETMAN_NETIF_FRAME_SIZE

#define NETMAN_NETIF_FRAME_SIZE   1514

Definition at line 13 of file netman.h.

◆ NETMAN_FRAME_GROUP_SIZE

#define NETMAN_FRAME_GROUP_SIZE   8

Definition at line 14 of file netman.h.

◆ NETMAN_NETIF_ETH_LINK_DISABLE_PAUSE

#define NETMAN_NETIF_ETH_LINK_DISABLE_PAUSE   0x40

Flow-control

Definition at line 53 of file netman.h.

◆ NETMAN_NETIF_IN_USE

#define NETMAN_NETIF_IN_USE   0x80

Set internally by NETMAN. Do not set externally.

Definition at line 142 of file netman.h.

◆ NETMAN_NETIF_ETHERNET

#define NETMAN_NETIF_ETHERNET   1

Set = network IF is an Ethernet IF.

Definition at line 144 of file netman.h.

◆ NETMAN_NETIF_DIALUP

#define NETMAN_NETIF_DIALUP   2

Set = network IF is a dailup modem.

Definition at line 146 of file netman.h.

◆ NETMAN_NETIF_LINK_UP

#define NETMAN_NETIF_LINK_UP   4

Set = network IF has a link up status.

Definition at line 148 of file netman.h.

◆ NETMAN_NETIF_EVF_UP

#define NETMAN_NETIF_EVF_UP   0x01

Definition at line 164 of file netman.h.

◆ NETMAN_NETIF_EVF_DOWN

#define NETMAN_NETIF_EVF_DOWN   0x02

Definition at line 165 of file netman.h.

◆ NETMAN_MAX_NETIF_COUNT

#define NETMAN_MAX_NETIF_COUNT   2

Definition at line 167 of file netman.h.

Enumeration Type Documentation

◆ NETMAN_NETIF_ETH_LINK_MODE

Enumerator
NETMAN_NETIF_ETH_LINK_MODE_AUTO 

Auto negotiation cannot be reflected by NETMAN_NETIF_IOCTL_ETH_GET_LINK_MODE.

NETMAN_NETIF_ETH_LINK_MODE_10M_HDX 

10Mbit Half-DupleX

NETMAN_NETIF_ETH_LINK_MODE_10M_FDX 

10Mbit Full-DupleX

NETMAN_NETIF_ETH_LINK_MODE_100M_HDX 

100Mbit Half-DupleX

NETMAN_NETIF_ETH_LINK_MODE_100M_FDX 

100Mbit Full-DupleX

Definition at line 55 of file netman.h.

◆ NETMAN_NETIF_ETH_LINK_STATE

enum NETMAN_NETIF_ETH_LINK_STATE

Definition at line 70 of file netman.h.

◆ NETMAN_NETIF_IOCTL_CODES

Enumerator
NETMAN_NETIF_IOCTL_ETH_GET_MAC 

Output = 6 bytes of MAC address.

NETMAN_NETIF_IOCTL_ETH_SET_LINK_MODE 

Input = struct NetManIFLinkModeParams. Note: does not wait for the IF to finish. Use NetManSetLinkMode() instead.

Definition at line 75 of file netman.h.

Function Documentation

◆ NetManGetGlobalNetIFLinkState()

int NetManGetGlobalNetIFLinkState ( void  )

Definition at line 27 of file netman.c.

◆ NetManSetMainIF()

int NetManSetMainIF ( const char *  name)

Definition at line 293 of file rpc_client.c.

◆ NetManQueryMainIF()

int NetManQueryMainIF ( char *  name)

Definition at line 312 of file rpc_client.c.

◆ NetManRegisterNetworkStack()

int NetManRegisterNetworkStack ( const struct NetManNetProtStack stack)

Definition at line 70 of file netman.c.

◆ NetManUnregisterNetworkStack()

void NetManUnregisterNetworkStack ( void  )

Definition at line 92 of file netman.c.

◆ NetManIoctl()

int NetManIoctl ( unsigned int  command,
void *  args,
unsigned int  args_len,
void *  output,
unsigned int  length 
)

Definition at line 109 of file netman.c.

◆ NetManSetLinkMode()

int NetManSetLinkMode ( int  mode)

Definition at line 335 of file rpc_client.c.

◆ NetManNetIFXmit()

void NetManNetIFXmit ( void  )

Definition at line 103 of file netman.c.

◆ NetManNetProtStackAllocRxPacket()

void * NetManNetProtStackAllocRxPacket ( unsigned int  length,
void **  payload 
)

Definition at line 114 of file netman.c.

◆ NetManNetProtStackFreeRxPacket()

void NetManNetProtStackFreeRxPacket ( void *  packet)

Definition at line 119 of file netman.c.

◆ NetManNetProtStackEnQRxPacket()

void NetManNetProtStackEnQRxPacket ( void *  packet)

Definition at line 124 of file netman.c.

◆ NetManTxPacketNext()

int NetManTxPacketNext ( void **  payload)

Definition at line 130 of file netman.c.

◆ NetManTxPacketDeQ()

void NetManTxPacketDeQ ( void  )

Definition at line 135 of file netman.c.

◆ NetManTxPacketAfter()

int NetManTxPacketAfter ( void **  payload)

Definition at line 141 of file netman.c.

◆ NetManNetProtStackReallocRxPacket()

void NetManNetProtStackReallocRxPacket ( void *  packet,
unsigned int  length 
)

Definition at line 146 of file netman.c.

◆ NetManRegisterNetIF()

int NetManRegisterNetIF ( struct NetManNetIF NetIF)

Definition at line 188 of file netman.c.

◆ NetManUnregisterNetIF()

void NetManUnregisterNetIF ( const char *  name)

Definition at line 220 of file netman.c.

◆ NetManToggleNetIFLinkState()

void NetManToggleNetIFLinkState ( int  NetIFID,
unsigned char  state 
)

Definition at line 238 of file netman.c.