sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
netman.h File Reference
#include <tamtypes.h>

Go to the source code of this file.

Classes

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.

Macro Definition Documentation

◆ NETMAN_FRAME_GROUP_SIZE

#define NETMAN_FRAME_GROUP_SIZE   8

Definition at line 19 of file netman.h.

◆ NETMAN_MAX_NETIF_COUNT

#define NETMAN_MAX_NETIF_COUNT   2

Definition at line 172 of file netman.h.

◆ NETMAN_NETIF_DIALUP

#define NETMAN_NETIF_DIALUP   2

Set = network IF is a dailup modem.

Definition at line 151 of file netman.h.

◆ NETMAN_NETIF_ETH_LINK_DISABLE_PAUSE

#define NETMAN_NETIF_ETH_LINK_DISABLE_PAUSE   0x40

Flow-control

Definition at line 58 of file netman.h.

◆ NETMAN_NETIF_ETHERNET

#define NETMAN_NETIF_ETHERNET   1

Set = network IF is an Ethernet IF.

Definition at line 149 of file netman.h.

◆ NETMAN_NETIF_EVF_DOWN

#define NETMAN_NETIF_EVF_DOWN   0x02

Definition at line 170 of file netman.h.

◆ NETMAN_NETIF_EVF_UP

#define NETMAN_NETIF_EVF_UP   0x01

Definition at line 169 of file netman.h.

◆ NETMAN_NETIF_FRAME_SIZE

#define NETMAN_NETIF_FRAME_SIZE   1514

Definition at line 18 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 147 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 153 of file netman.h.

◆ NETMAN_NETIF_NAME_MAX_LEN

#define NETMAN_NETIF_NAME_MAX_LEN   4

Definition at line 17 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 60 of file netman.h.

◆ NETMAN_NETIF_ETH_LINK_STATE

enum NETMAN_NETIF_ETH_LINK_STATE

Definition at line 75 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 80 of file netman.h.

Function Documentation

◆ NetManGetGlobalNetIFLinkState()

int NetManGetGlobalNetIFLinkState ( void )
extern

Definition at line 27 of file netman.c.

◆ NetManIoctl()

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

Definition at line 109 of file netman.c.

◆ NetManNetIFXmit()

void NetManNetIFXmit ( void )
extern

Definition at line 103 of file netman.c.

◆ NetManNetProtStackAllocRxPacket()

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

Definition at line 114 of file netman.c.

◆ NetManNetProtStackEnQRxPacket()

void NetManNetProtStackEnQRxPacket ( void * packet)
extern

Definition at line 124 of file netman.c.

◆ NetManNetProtStackFreeRxPacket()

void NetManNetProtStackFreeRxPacket ( void * packet)
extern

Definition at line 119 of file netman.c.

◆ NetManNetProtStackReallocRxPacket()

void NetManNetProtStackReallocRxPacket ( void * packet,
unsigned int length )
extern

Definition at line 146 of file netman.c.

◆ NetManQueryMainIF()

int NetManQueryMainIF ( char * name)
extern

Definition at line 307 of file rpc_client.c.

◆ NetManRegisterNetIF()

int NetManRegisterNetIF ( struct NetManNetIF * NetIF)
extern

Definition at line 191 of file netman.c.

◆ NetManRegisterNetworkStack()

int NetManRegisterNetworkStack ( const struct NetManNetProtStack * stack)
extern

Definition at line 70 of file netman.c.

◆ NetManSetLinkMode()

int NetManSetLinkMode ( int mode)
extern

Definition at line 330 of file rpc_client.c.

◆ NetManSetMainIF()

int NetManSetMainIF ( const char * name)
extern

Definition at line 288 of file rpc_client.c.

◆ NetManToggleNetIFLinkState()

void NetManToggleNetIFLinkState ( int NetIFID,
unsigned char state )
extern

Definition at line 241 of file netman.c.

◆ NetManTxPacketAfter()

int NetManTxPacketAfter ( void ** payload)
extern

Definition at line 141 of file netman.c.

◆ NetManTxPacketDeQ()

void NetManTxPacketDeQ ( void )
extern

Definition at line 135 of file netman.c.

◆ NetManTxPacketNext()

int NetManTxPacketNext ( void ** payload)
extern

Definition at line 130 of file netman.c.

◆ NetManUnregisterNetIF()

void NetManUnregisterNetIF ( const char * name)
extern

Definition at line 223 of file netman.c.

◆ NetManUnregisterNetworkStack()

void NetManUnregisterNetworkStack ( void )
extern

Definition at line 92 of file netman.c.