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

Go to the source code of this file.

Classes

struct  sceInetPkt
struct  sceInetPktQ
struct  sceInetDevOps

Macros

#define sceInetBus_Unknown   0
#define sceInetBus_USB   1
#define sceInetBus_1394   2
#define sceInetBus_PCMCIA   3
#define sceInetBus_PSEUDO   4
#define sceInetBus_NIC   5
#define sceInetDevProtVer   2
#define sceInetDevF_Up   0x0001
#define sceInetDevF_Running   0x0002
#define sceInetDevF_Broadcast   0x0004
#define sceInetDevF_ARP   0x0010
#define sceInetDevF_DHCP   0x0020
#define sceInetDevF_PPP   0x0040
#define sceInetDevF_NIC   0x0080
#define sceInetDevF_Error   0x0100
#define sceInetDevF_PPPoE   0x0200
#define sceInetDevF_Multicast   0x0400
#define sceInetDevEFP_StartDone   0x00000001
#define sceInetDevEFP_PlugOut   0x00000002
#define sceInetDevEFP_Recv   0x00000004
#define sceInetDevEFP_Error   0x00000010
#define sceInetDevEFP_TimeOut   0x00000020
#define sceInetDevEFP_InetUse   0xffff0000
#define sceInetDevDHCP_RelOnStop   0x00000001
#define sceInetNDCC_GET_THPRI   0x80000000
#define sceInetNDCC_SET_THPRI   0x81000000
#define sceInetNDCC_GET_IF_TYPE   0x80000100
#define sceInetNDCC_GET_RX_PACKETS   0x80010000
#define sceInetNDCC_GET_TX_PACKETS   0x80010001
#define sceInetNDCC_GET_RX_BYTES   0x80010002
#define sceInetNDCC_GET_TX_BYTES   0x80010003
#define sceInetNDCC_GET_RX_ERRORS   0x80010004
#define sceInetNDCC_GET_TX_ERRORS   0x80010005
#define sceInetNDCC_GET_RX_DROPPED   0x80010006
#define sceInetNDCC_GET_TX_DROPPED   0x80010007
#define sceInetNDCC_GET_RX_BROADCAST_PACKETS   0x80010008
#define sceInetNDCC_GET_TX_BROADCAST_PACKETS   0x80010009
#define sceInetNDCC_GET_RX_BROADCAST_BYTES   0x8001000a
#define sceInetNDCC_GET_TX_BROADCAST_BYTES   0x8001000b
#define sceInetNDCC_GET_RX_MULTICAST_PACKETS   0x8001000c
#define sceInetNDCC_GET_TX_MULTICAST_PACKETS   0x8001000d
#define sceInetNDCC_GET_RX_MULTICAST_BYTES   0x8001000e
#define sceInetNDCC_GET_TX_MULTICAST_BYTES   0x8001000f
#define sceInetNDIFT_GENERIC   0x00000000
#define sceInetNDIFT_ETHERNET   0x00000001
#define sceInetNDIFT_PPP   0x00000002
#define sceInetNDCC_GET_MULTICAST   0x80011000
#define sceInetNDCC_GET_COLLISIONS   0x80011001
#define sceInetNDCC_GET_RX_LENGTH_ER   0x80011002
#define sceInetNDCC_GET_RX_OVER_ER   0x80011003
#define sceInetNDCC_GET_RX_CRC_ER   0x80011004
#define sceInetNDCC_GET_RX_FRAME_ER   0x80011005
#define sceInetNDCC_GET_RX_FIFO_ER   0x80011006
#define sceInetNDCC_GET_RX_MISSED_ER   0x80011007
#define sceInetNDCC_GET_TX_ABORTED_ER   0x80011008
#define sceInetNDCC_GET_TX_CARRIER_ER   0x80011009
#define sceInetNDCC_GET_TX_FIFO_ER   0x8001100a
#define sceInetNDCC_GET_TX_HEARTBEAT_ER   0x8001100b
#define sceInetNDCC_GET_TX_WINDOW_ER   0x8001100c
#define sceInetNDCC_GET_NEGO_MODE   0x80020000
#define sceInetNDCC_SET_NEGO_MODE   0x81020000
#define sceInetNDCC_GET_NEGO_STATUS   0x80020001
#define sceInetNDCC_GET_LINK_STATUS   0x80030000
#define sceInetNDCC_SET_MULTICAST_LIST   0x81040000
#define sceInetNDNEGO_10   0x0001
#define sceInetNDNEGO_10_FD   0x0002
#define sceInetNDNEGO_TX   0x0004
#define sceInetNDNEGO_TX_FD   0x0008
#define sceInetNDNEGO_PAUSE   0x0040
#define sceInetNDNEGO_AUTO   0x0080
#define netdev_IMPORTS_start   DECLARE_IMPORT_TABLE(netdev, 1, 1)
#define netdev_IMPORTS_end   END_IMPORT_TABLE
#define I_sceInetRegisterNetDevice   DECLARE_IMPORT(4, sceInetRegisterNetDevice)
#define I_sceInetUnregisterNetDevice   DECLARE_IMPORT(5, sceInetUnregisterNetDevice)
#define I_sceInetAllocMem   DECLARE_IMPORT(6, sceInetAllocMem)
#define I_sceInetFreeMem   DECLARE_IMPORT(7, sceInetFreeMem)
#define I_sceInetPktEnQ   DECLARE_IMPORT(8, sceInetPktEnQ)
#define I_sceInetPktDeQ   DECLARE_IMPORT(9, sceInetPktDeQ)
#define I_sceInetRand   DECLARE_IMPORT(10, sceInetRand)
#define I_sceInetPrintf   DECLARE_IMPORT(11, sceInetPrintf)
#define I_sceInetAllocPkt   DECLARE_IMPORT(12, sceInetAllocPkt)
#define I_sceInetFreePkt   DECLARE_IMPORT(13, sceInetFreePkt)
#define I_sceInetRegisterPPPoE   DECLARE_IMPORT(14, sceInetRegisterPPPoE)
#define I_sceInetUnregisterPPPoE   DECLARE_IMPORT(15, sceInetUnregisterPPPoE)

Typedefs

typedef struct sceInetPkt sceInetPkt_t
typedef struct sceInetPktQ sceInetPktQ_t
typedef struct sceInetDevOps sceInetDevOps_t

Functions

int sceInetRegisterNetDevice (sceInetDevOps_t *ops)
int sceInetUnregisterNetDevice (sceInetDevOps_t *ops)
void * sceInetAllocMem (sceInetDevOps_t *ops, int siz)
void sceInetFreeMem (sceInetDevOps_t *ops, void *ptr)
void sceInetPktEnQ (sceInetPktQ_t *que, sceInetPkt_t *pkt)
sceInetPkt_t * sceInetPktDeQ (sceInetPktQ_t *que)
unsigned int sceInetRand (void)
int sceInetPrintf (const char *fmt,...)
sceInetPkt_t * sceInetAllocPkt (sceInetDevOps_t *ops, int siz)
void sceInetFreePkt (sceInetDevOps_t *ops, sceInetPkt_t *pkt)

Macro Definition Documentation

◆ I_sceInetAllocMem

#define I_sceInetAllocMem   DECLARE_IMPORT(6, sceInetAllocMem)

Definition at line 173 of file netdev.h.

◆ I_sceInetAllocPkt

#define I_sceInetAllocPkt   DECLARE_IMPORT(12, sceInetAllocPkt)

Definition at line 179 of file netdev.h.

◆ I_sceInetFreeMem

#define I_sceInetFreeMem   DECLARE_IMPORT(7, sceInetFreeMem)

Definition at line 174 of file netdev.h.

◆ I_sceInetFreePkt

#define I_sceInetFreePkt   DECLARE_IMPORT(13, sceInetFreePkt)

Definition at line 180 of file netdev.h.

◆ I_sceInetPktDeQ

#define I_sceInetPktDeQ   DECLARE_IMPORT(9, sceInetPktDeQ)

Definition at line 176 of file netdev.h.

◆ I_sceInetPktEnQ

#define I_sceInetPktEnQ   DECLARE_IMPORT(8, sceInetPktEnQ)

Definition at line 175 of file netdev.h.

◆ I_sceInetPrintf

#define I_sceInetPrintf   DECLARE_IMPORT(11, sceInetPrintf)

Definition at line 178 of file netdev.h.

◆ I_sceInetRand

#define I_sceInetRand   DECLARE_IMPORT(10, sceInetRand)

Definition at line 177 of file netdev.h.

◆ I_sceInetRegisterNetDevice

#define I_sceInetRegisterNetDevice   DECLARE_IMPORT(4, sceInetRegisterNetDevice)

Definition at line 171 of file netdev.h.

◆ I_sceInetRegisterPPPoE

#define I_sceInetRegisterPPPoE   DECLARE_IMPORT(14, sceInetRegisterPPPoE)

Definition at line 181 of file netdev.h.

◆ I_sceInetUnregisterNetDevice

#define I_sceInetUnregisterNetDevice   DECLARE_IMPORT(5, sceInetUnregisterNetDevice)

Definition at line 172 of file netdev.h.

◆ I_sceInetUnregisterPPPoE

#define I_sceInetUnregisterPPPoE   DECLARE_IMPORT(15, sceInetUnregisterPPPoE)

Definition at line 182 of file netdev.h.

◆ netdev_IMPORTS_end

#define netdev_IMPORTS_end   END_IMPORT_TABLE

Definition at line 169 of file netdev.h.

◆ netdev_IMPORTS_start

#define netdev_IMPORTS_start   DECLARE_IMPORT_TABLE(netdev, 1, 1)

Definition at line 168 of file netdev.h.

◆ sceInetBus_1394

#define sceInetBus_1394   2

Definition at line 22 of file netdev.h.

◆ sceInetBus_NIC

#define sceInetBus_NIC   5

Definition at line 25 of file netdev.h.

◆ sceInetBus_PCMCIA

#define sceInetBus_PCMCIA   3

Definition at line 23 of file netdev.h.

◆ sceInetBus_PSEUDO

#define sceInetBus_PSEUDO   4

Definition at line 24 of file netdev.h.

◆ sceInetBus_Unknown

#define sceInetBus_Unknown   0

Definition at line 20 of file netdev.h.

◆ sceInetBus_USB

#define sceInetBus_USB   1

Definition at line 21 of file netdev.h.

◆ sceInetDevDHCP_RelOnStop

#define sceInetDevDHCP_RelOnStop   0x00000001

Definition at line 47 of file netdev.h.

◆ sceInetDevEFP_Error

#define sceInetDevEFP_Error   0x00000010

Definition at line 43 of file netdev.h.

◆ sceInetDevEFP_InetUse

#define sceInetDevEFP_InetUse   0xffff0000

Definition at line 45 of file netdev.h.

◆ sceInetDevEFP_PlugOut

#define sceInetDevEFP_PlugOut   0x00000002

Definition at line 41 of file netdev.h.

◆ sceInetDevEFP_Recv

#define sceInetDevEFP_Recv   0x00000004

Definition at line 42 of file netdev.h.

◆ sceInetDevEFP_StartDone

#define sceInetDevEFP_StartDone   0x00000001

Definition at line 40 of file netdev.h.

◆ sceInetDevEFP_TimeOut

#define sceInetDevEFP_TimeOut   0x00000020

Definition at line 44 of file netdev.h.

◆ sceInetDevF_ARP

#define sceInetDevF_ARP   0x0010

Definition at line 32 of file netdev.h.

◆ sceInetDevF_Broadcast

#define sceInetDevF_Broadcast   0x0004

Definition at line 31 of file netdev.h.

◆ sceInetDevF_DHCP

#define sceInetDevF_DHCP   0x0020

Definition at line 33 of file netdev.h.

◆ sceInetDevF_Error

#define sceInetDevF_Error   0x0100

Definition at line 36 of file netdev.h.

◆ sceInetDevF_Multicast

#define sceInetDevF_Multicast   0x0400

Definition at line 38 of file netdev.h.

◆ sceInetDevF_NIC

#define sceInetDevF_NIC   0x0080

Definition at line 35 of file netdev.h.

◆ sceInetDevF_PPP

#define sceInetDevF_PPP   0x0040

Definition at line 34 of file netdev.h.

◆ sceInetDevF_PPPoE

#define sceInetDevF_PPPoE   0x0200

Definition at line 37 of file netdev.h.

◆ sceInetDevF_Running

#define sceInetDevF_Running   0x0002

Definition at line 30 of file netdev.h.

◆ sceInetDevF_Up

#define sceInetDevF_Up   0x0001

Definition at line 29 of file netdev.h.

◆ sceInetDevProtVer

#define sceInetDevProtVer   2

Definition at line 27 of file netdev.h.

◆ sceInetNDCC_GET_COLLISIONS

#define sceInetNDCC_GET_COLLISIONS   0x80011001

Definition at line 74 of file netdev.h.

◆ sceInetNDCC_GET_IF_TYPE

#define sceInetNDCC_GET_IF_TYPE   0x80000100

Definition at line 51 of file netdev.h.

◆ sceInetNDCC_GET_LINK_STATUS

#define sceInetNDCC_GET_LINK_STATUS   0x80030000

Definition at line 89 of file netdev.h.

◆ sceInetNDCC_GET_MULTICAST

#define sceInetNDCC_GET_MULTICAST   0x80011000

Definition at line 73 of file netdev.h.

◆ sceInetNDCC_GET_NEGO_MODE

#define sceInetNDCC_GET_NEGO_MODE   0x80020000

Definition at line 86 of file netdev.h.

◆ sceInetNDCC_GET_NEGO_STATUS

#define sceInetNDCC_GET_NEGO_STATUS   0x80020001

Definition at line 88 of file netdev.h.

◆ sceInetNDCC_GET_RX_BROADCAST_BYTES

#define sceInetNDCC_GET_RX_BROADCAST_BYTES   0x8001000a

Definition at line 62 of file netdev.h.

◆ sceInetNDCC_GET_RX_BROADCAST_PACKETS

#define sceInetNDCC_GET_RX_BROADCAST_PACKETS   0x80010008

Definition at line 60 of file netdev.h.

◆ sceInetNDCC_GET_RX_BYTES

#define sceInetNDCC_GET_RX_BYTES   0x80010002

Definition at line 54 of file netdev.h.

◆ sceInetNDCC_GET_RX_CRC_ER

#define sceInetNDCC_GET_RX_CRC_ER   0x80011004

Definition at line 77 of file netdev.h.

◆ sceInetNDCC_GET_RX_DROPPED

#define sceInetNDCC_GET_RX_DROPPED   0x80010006

Definition at line 58 of file netdev.h.

◆ sceInetNDCC_GET_RX_ERRORS

#define sceInetNDCC_GET_RX_ERRORS   0x80010004

Definition at line 56 of file netdev.h.

◆ sceInetNDCC_GET_RX_FIFO_ER

#define sceInetNDCC_GET_RX_FIFO_ER   0x80011006

Definition at line 79 of file netdev.h.

◆ sceInetNDCC_GET_RX_FRAME_ER

#define sceInetNDCC_GET_RX_FRAME_ER   0x80011005

Definition at line 78 of file netdev.h.

◆ sceInetNDCC_GET_RX_LENGTH_ER

#define sceInetNDCC_GET_RX_LENGTH_ER   0x80011002

Definition at line 75 of file netdev.h.

◆ sceInetNDCC_GET_RX_MISSED_ER

#define sceInetNDCC_GET_RX_MISSED_ER   0x80011007

Definition at line 80 of file netdev.h.

◆ sceInetNDCC_GET_RX_MULTICAST_BYTES

#define sceInetNDCC_GET_RX_MULTICAST_BYTES   0x8001000e

Definition at line 66 of file netdev.h.

◆ sceInetNDCC_GET_RX_MULTICAST_PACKETS

#define sceInetNDCC_GET_RX_MULTICAST_PACKETS   0x8001000c

Definition at line 64 of file netdev.h.

◆ sceInetNDCC_GET_RX_OVER_ER

#define sceInetNDCC_GET_RX_OVER_ER   0x80011003

Definition at line 76 of file netdev.h.

◆ sceInetNDCC_GET_RX_PACKETS

#define sceInetNDCC_GET_RX_PACKETS   0x80010000

Definition at line 52 of file netdev.h.

◆ sceInetNDCC_GET_THPRI

#define sceInetNDCC_GET_THPRI   0x80000000

Definition at line 49 of file netdev.h.

◆ sceInetNDCC_GET_TX_ABORTED_ER

#define sceInetNDCC_GET_TX_ABORTED_ER   0x80011008

Definition at line 81 of file netdev.h.

◆ sceInetNDCC_GET_TX_BROADCAST_BYTES

#define sceInetNDCC_GET_TX_BROADCAST_BYTES   0x8001000b

Definition at line 63 of file netdev.h.

◆ sceInetNDCC_GET_TX_BROADCAST_PACKETS

#define sceInetNDCC_GET_TX_BROADCAST_PACKETS   0x80010009

Definition at line 61 of file netdev.h.

◆ sceInetNDCC_GET_TX_BYTES

#define sceInetNDCC_GET_TX_BYTES   0x80010003

Definition at line 55 of file netdev.h.

◆ sceInetNDCC_GET_TX_CARRIER_ER

#define sceInetNDCC_GET_TX_CARRIER_ER   0x80011009

Definition at line 82 of file netdev.h.

◆ sceInetNDCC_GET_TX_DROPPED

#define sceInetNDCC_GET_TX_DROPPED   0x80010007

Definition at line 59 of file netdev.h.

◆ sceInetNDCC_GET_TX_ERRORS

#define sceInetNDCC_GET_TX_ERRORS   0x80010005

Definition at line 57 of file netdev.h.

◆ sceInetNDCC_GET_TX_FIFO_ER

#define sceInetNDCC_GET_TX_FIFO_ER   0x8001100a

Definition at line 83 of file netdev.h.

◆ sceInetNDCC_GET_TX_HEARTBEAT_ER

#define sceInetNDCC_GET_TX_HEARTBEAT_ER   0x8001100b

Definition at line 84 of file netdev.h.

◆ sceInetNDCC_GET_TX_MULTICAST_BYTES

#define sceInetNDCC_GET_TX_MULTICAST_BYTES   0x8001000f

Definition at line 67 of file netdev.h.

◆ sceInetNDCC_GET_TX_MULTICAST_PACKETS

#define sceInetNDCC_GET_TX_MULTICAST_PACKETS   0x8001000d

Definition at line 65 of file netdev.h.

◆ sceInetNDCC_GET_TX_PACKETS

#define sceInetNDCC_GET_TX_PACKETS   0x80010001

Definition at line 53 of file netdev.h.

◆ sceInetNDCC_GET_TX_WINDOW_ER

#define sceInetNDCC_GET_TX_WINDOW_ER   0x8001100c

Definition at line 85 of file netdev.h.

◆ sceInetNDCC_SET_MULTICAST_LIST

#define sceInetNDCC_SET_MULTICAST_LIST   0x81040000

Definition at line 90 of file netdev.h.

◆ sceInetNDCC_SET_NEGO_MODE

#define sceInetNDCC_SET_NEGO_MODE   0x81020000

Definition at line 87 of file netdev.h.

◆ sceInetNDCC_SET_THPRI

#define sceInetNDCC_SET_THPRI   0x81000000

Definition at line 50 of file netdev.h.

◆ sceInetNDIFT_ETHERNET

#define sceInetNDIFT_ETHERNET   0x00000001

Definition at line 70 of file netdev.h.

◆ sceInetNDIFT_GENERIC

#define sceInetNDIFT_GENERIC   0x00000000

Definition at line 69 of file netdev.h.

◆ sceInetNDIFT_PPP

#define sceInetNDIFT_PPP   0x00000002

Definition at line 71 of file netdev.h.

◆ sceInetNDNEGO_10

#define sceInetNDNEGO_10   0x0001

Definition at line 92 of file netdev.h.

◆ sceInetNDNEGO_10_FD

#define sceInetNDNEGO_10_FD   0x0002

Definition at line 93 of file netdev.h.

◆ sceInetNDNEGO_AUTO

#define sceInetNDNEGO_AUTO   0x0080

Definition at line 97 of file netdev.h.

◆ sceInetNDNEGO_PAUSE

#define sceInetNDNEGO_PAUSE   0x0040

Definition at line 96 of file netdev.h.

◆ sceInetNDNEGO_TX

#define sceInetNDNEGO_TX   0x0004

Definition at line 94 of file netdev.h.

◆ sceInetNDNEGO_TX_FD

#define sceInetNDNEGO_TX_FD   0x0008

Definition at line 95 of file netdev.h.

Function Documentation

◆ sceInetAllocMem()

void * sceInetAllocMem ( sceInetDevOps_t * ops,
int siz )
extern

Definition at line 214 of file netdev.c.

◆ sceInetAllocPkt()

sceInetPkt_t * sceInetAllocPkt ( sceInetDevOps_t * ops,
int siz )
extern

Definition at line 256 of file netdev.c.

◆ sceInetFreeMem()

void sceInetFreeMem ( sceInetDevOps_t * ops,
void * ptr )
extern

Definition at line 220 of file netdev.c.

◆ sceInetFreePkt()

void sceInetFreePkt ( sceInetDevOps_t * ops,
sceInetPkt_t * pkt )
extern

Definition at line 271 of file netdev.c.

◆ sceInetPktDeQ()

sceInetPkt_t * sceInetPktDeQ ( sceInetPktQ_t * que)
extern

Definition at line 230 of file netdev.c.

◆ sceInetPktEnQ()

void sceInetPktEnQ ( sceInetPktQ_t * que,
sceInetPkt_t * pkt )
extern

Definition at line 225 of file netdev.c.

◆ sceInetPrintf()

int sceInetPrintf ( const char * fmt,
... )
extern

Definition at line 250 of file netdev.c.

◆ sceInetRand()

unsigned int sceInetRand ( void )
extern

Definition at line 244 of file netdev.c.

◆ sceInetRegisterNetDevice()

int sceInetRegisterNetDevice ( sceInetDevOps_t * ops)
extern

Definition at line 183 of file netdev.c.

◆ sceInetUnregisterNetDevice()

int sceInetUnregisterNetDevice ( sceInetDevOps_t * ops)
extern

Definition at line 202 of file netdev.c.