Main Page Data Structures File List Data Fields Globals Related Pages

# clib/PKTDRV.H File Reference

Go to the source code of this file.

## Data Structures
struct | tag_driver_info
struct | tag_ethernet_packet_format
union | union_eth
## Defines
#define | PKTVECT 0xAE
#define | SIZE_ETH_HEADER (int)14
#define | ETH_MIN (int)64
#define | ETH_MAX (int)1500
#define | NO_ERROR 0
#define | BAD_HANDLE 1
#define | BAD_TYPE 5
#define | NO_SPACE 9
#define | TYPE_INUSE 10
#define | BAD_COMMAND 11
#define | CANT_SEND 12
#define | DRIVER_INFO 1
#define | ACCESS_TYPE 2
#define | RELEASE_TYPE 3
#define | SEND_PKT 4
#define | GET_ADDRESS 6
#define | SET_RCVMODE 20
#define | GET_RCVMODE 21
#define | SET_MULTICAST 22
#define | DEL_MULTICAST 39
#define | INSTALL_WILDCARD 40
## Typedefs
typedef tag_ethernet_packet_format | Eth_Packet
typedef union_eth | Ethernet_Packet
typedef tag_driver_info | Driver_Info
typedef void(far * | fpFktPtr )()
## Functions
unsigned char | PktDriver_Installed (void)
unsigned char | Get_Driver_Info (Driver_Info *drv_info)
unsigned char | Get_Eth_Address (unsigned char *buffer, unsigned int len)
unsigned char | Send_Packet (unsigned char *buffer, unsigned int len)
unsigned int | Set_Access_Type (Driver_Info *drv_info, fpFktPtr Receiver, int *pkt_type, int *handle)
unsigned int | Release_Type (unsigned int handle)
unsigned int | Set_Multicast (unsigned char *mac_addr, int set)
unsigned int | Set_WildcardAccess_Type (Driver_Info *drv_info, fpFktPtr Receiver, int *pkt_type, int *handle)
unsigned int | Get_Receive_Mode (unsigned char *error)
unsigned int | Set_Receive_Mode (unsigned int mode, unsigned char *error)

## Define Documentation

#define ACCESS_TYPE 2

| Definition at line 89 of file PKTDRV.H. Referenced by Set_Access_Type().

#define BAD_COMMAND 11

| Definition at line 83 of file PKTDRV.H.

#define BAD_HANDLE 1

| Definition at line 79 of file PKTDRV.H.

#define BAD_TYPE 5

| Definition at line 80 of file PKTDRV.H.

#define CANT_SEND 12

| Definition at line 84 of file PKTDRV.H.

#define DEL_MULTICAST 39

| Definition at line 96 of file PKTDRV.H. Referenced by Set_Multicast().

#define DRIVER_INFO 1

| Definition at line 88 of file PKTDRV.H. Referenced by Get_Driver_Info().

#define ETH_MAX (int)1500

| Definition at line 72 of file PKTDRV.H.

#define ETH_MIN (int)64

| Definition at line 71 of file PKTDRV.H.

#define GET_ADDRESS 6

| Definition at line 92 of file PKTDRV.H. Referenced by Get_Eth_Address().

#define GET_RCVMODE 21

| Definition at line 94 of file PKTDRV.H. Referenced by Get_Receive_Mode().

#define INSTALL_WILDCARD 40

| Definition at line 97 of file PKTDRV.H. Referenced by Set_WildcardAccess_Type().

#define NO_ERROR 0

| Definition at line 78 of file PKTDRV.H.

#define NO_SPACE 9

| Definition at line 81 of file PKTDRV.H.

#define PKTVECT 0xAE

| Definition at line 67 of file PKTDRV.H. Referenced by Get_Driver_Info(), Get_Eth_Address(), Get_Receive_Mode(), Release_Type(), Send_Packet(), Set_Access_Type(), Set_Multicast(), Set_Receive_Mode(), and Set_WildcardAccess_Type().

#define RELEASE_TYPE 3

| Definition at line 90 of file PKTDRV.H. Referenced by Release_Type().

#define SEND_PKT 4

| Definition at line 91 of file PKTDRV.H. Referenced by Send_Packet().

#define SET_MULTICAST 22

| Definition at line 95 of file PKTDRV.H. Referenced by Set_Multicast().

#define SET_RCVMODE 20

| Definition at line 93 of file PKTDRV.H. Referenced by Set_Receive_Mode().

#define SIZE_ETH_HEADER (int)14

| Definition at line 70 of file PKTDRV.H.

#define TYPE_INUSE 10

| Definition at line 82 of file PKTDRV.H.

## Typedef Documentation

typedef struct tag_driver_info Driver_Info

typedef struct tag_ethernet_packet_format Eth_Packet

typedef union union_eth Ethernet_Packet

typedef void(far * fpFktPtr)()

| Definition at line 136 of file PKTDRV.H. Referenced by Set_Access_Type(), and Set_WildcardAccess_Type().

## Function Documentation

unsigned char Get_Driver_Info | ( | Driver_Info * | drv_info | ) |

| Definition at line 74 of file PKTDRV.C. References tag_driver_info::_class, tag_driver_info::basic, DRIVER_INFO, tag_driver_info::number, PKTVECT, tag_driver_info::type, and tag_driver_info::version.

unsigned char Get_Eth_Address | ( | unsigned char * | buffer,
|  | unsigned int | len
| ) |

| Definition at line 98 of file PKTDRV.C. References GET_ADDRESS, and PKTVECT.

unsigned int Get_Receive_Mode | ( | unsigned char * | error | ) |

| Definition at line 277 of file PKTDRV.C. References GET_RCVMODE, and PKTVECT.

unsigned char PktDriver_Installed | ( | void |  | ) |

| Definition at line 53 of file PKTDRV.C.

unsigned int Release_Type | ( | unsigned int | handle | ) |

| Definition at line 180 of file PKTDRV.C. References PKTVECT, and RELEASE_TYPE.

unsigned char Send_Packet | ( | unsigned char * | buffer,
|  | unsigned int | len
| ) |

| Definition at line 121 of file PKTDRV.C. References PKTVECT, and SEND_PKT.

unsigned int Set_Access_Type | ( | Driver_Info * | drv_info,
|  | fpFktPtr | Receiver,
|  | int * | pkt_type,
|  | int * | handle
| ) |

| Definition at line 146 of file PKTDRV.C. References tag_driver_info::_class, ACCESS_TYPE, fpFktPtr, tag_driver_info::number, PKTVECT, and tag_driver_info::type.

unsigned int Set_Multicast | ( | unsigned char * | mac_addr,
|  | int | set
| ) |

| Definition at line 201 of file PKTDRV.C. References DEL_MULTICAST, PKTVECT, and SET_MULTICAST.

unsigned int Set_Receive_Mode | ( | unsigned int | mode,
|  | unsigned char * | error
| ) |

| Definition at line 298 of file PKTDRV.C. References PKTVECT, and SET_RCVMODE.

unsigned int Set_WildcardAccess_Type | ( | Driver_Info * | drv_info,
|  | fpFktPtr | Receiver,
|  | int * | pkt_type,
|  | int * | handle
| ) |

| Definition at line 241 of file PKTDRV.C. References tag_driver_info::_class, fpFktPtr, INSTALL_WILDCARD, tag_driver_info::number, PKTVECT, and tag_driver_info::type.