Watt-32 tcp/ip  2.2 dev-rel.10
Data Structures | Typedefs | Enumerations | Functions | Variables
winpkt.h File Reference

Go to the source code of this file.

Data Structures

struct  pkt_info
 Placeholder for vital data accessed by capture thread. More...
 

Typedefs

typedef BOOL(* func_init )(void)
 
typedef void *(* func_open )(const char *name,...)
 
typedef BOOL(* func_close )(void *a)
 
typedef UINT(* func_send )(const void *a, const void *buf, UINT buf_len)
 
typedef BOOL(* func_get_mac )(const void *a, const void *mac)
 
typedef BOOL(* func_get_stats )(const void *a, struct PktStats *stats, struct PktStats *total)
 
typedef BOOL(* func_get_if_stat )(const void *a, BOOL *up)
 
typedef BOOL(* func_get_if_type )(const void *a, WORD *type)
 
typedef BOOL(* func_get_if_mtu )(const void *a, DWORD *Mbit_s)
 
typedef BOOL(* func_get_if_speed )(const void *a, DWORD *Mbit_s)
 
typedef BOOL(* func_get_descr )(const void *a, char *descr, size_t max)
 
typedef const char *(* func_get_drv_ver )(void)
 
typedef voidbuf
 
typedef void UINT buf_len
 

Enumerations

enum  ReceiveModes {
  RXMODE_OFF = 1,
  RXMODE_DIRECT = 2,
  RXMODE_BROADCAST = 3,
  RXMODE_MULTICAST1 = 4,
  RXMODE_MULTICAST2 = 5,
  RXMODE_PROMISCOUS = 6,
  RXMODE_OFF = 0x00,
  RXMODE_DIRECT = 0x01,
  RXMODE_MULTICAST1 = 0x02,
  RXMODE_MULTICAST2 = 0x04,
  RXMODE_BROADCAST = 0x08,
  RXMODE_PROMISCOUS = 0x20,
  RXMODE_ALL_LOCAL = 0x80
}
 

Functions

struct pkt_rx_elementpkt_poll_recv (void)
 
int pkt_get_multicast_list (mac_address *listbuf, int *len)
 Gets the current list of multicast addresses from the PKTDRVR. More...
 
int pkt_set_multicast_list (const void *listbuf, int len)
 Sets the list of multicast addresses for which the PKTDRVR is responsible. More...
 
typedef UINT (MS_CDECL *func_recv)(const void *a
 
void winpkt_trace (const char *fmt,...) ATTR_PRINTF(1
 
void void winpkt_trace_fclose (void)
 

Variables

char _pktdrvr_descr []
 
struct pkt_info_pkt_inf
 module data that will be locked
 
const char * winpkt_trace_func
 
const char * winpkt_trace_file
 
UINT winpkt_trace_line
 
UINT winpkt_trace_level
 

Detailed Description

Only included on Win32

Definition in file winpkt.h.

Enumeration Type Documentation

Enumerator
RXMODE_OFF 

turn off receiver

RXMODE_DIRECT 

receive only to this interface

RXMODE_BROADCAST 

DIRECT + broadcast packets.

RXMODE_MULTICAST1 

BROADCAST + limited multicast.

RXMODE_MULTICAST2 

BROADCAST + all multicast.

RXMODE_PROMISCOUS 

receive all packets on network

RXMODE_OFF 

possible to turn off?

RXMODE_DIRECT 

NDIS_PACKET_TYPE_DIRECTED.

RXMODE_MULTICAST1 

NDIS_PACKET_TYPE_MULTICAST.

RXMODE_MULTICAST2 

NDIS_PACKET_TYPE_ALL_MULTICAST.

RXMODE_BROADCAST 

NDIS_PACKET_TYPE_BROADCAST.

RXMODE_PROMISCOUS 

NDIS_PACKET_TYPE_PROMISCUOUS.

RXMODE_ALL_LOCAL 

NDIS_PACKET_TYPE_ALL_LOCAL (direct+bc+mc1)

Definition at line 23 of file winpkt.h.

Function Documentation

int pkt_get_multicast_list ( mac_address *  listbuf,
int *  len 
)

Gets the current list of multicast addresses from the PKTDRVR.

  • listbuf is the buffer into which the list is placed
  • len on input: length of listbuf on output: length of list returned
Return values
0upon error - _pkt_errno is set
1if retrieval was successful,

Definition at line 2037 of file pcpkt.c.

References _pkt_errno, _pktdevlevel, _pktserial, and get_rmode_data().

int pkt_set_multicast_list ( const void listbuf,
int  len 
)

Sets the list of multicast addresses for which the PKTDRVR is responsible.

  • listbuf is the buffer containing the list
  • len is the length of listbuf
Return values
0upon error - _pkt_errno is set
1if set was successful

Definition at line 2084 of file pcpkt.c.

References _pkt_errno, _pktdevlevel, and _pktserial.