Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

intf.h File Reference

Go to the source code of this file.

Defines

#define INTF_NAME_LEN   16
#define INTF_TYPE_OTHER   1
#define INTF_TYPE_ETH   6
#define INTF_TYPE_TOKENRING   9
#define INTF_TYPE_FDDI   15
#define INTF_TYPE_PPP   23
#define INTF_TYPE_LOOPBACK   24
#define INTF_TYPE_SLIP   28
#define INTF_TYPE_TUN   53
#define INTF_FLAG_UP   0x01
#define INTF_FLAG_LOOPBACK   0x02
#define INTF_FLAG_POINTOPOINT   0x04
#define INTF_FLAG_NOARP   0x08
#define INTF_FLAG_BROADCAST   0x10
#define INTF_FLAG_MULTICAST   0x20

Typedefs

typedef intf_handle intf_t
typedef int(* intf_handler )(const struct intf_entry *entry, void *arg)

Functions

__BEGIN_DECLS intf_tintf_open (void)
int intf_get (intf_t *i, struct intf_entry *entry)
int intf_get_src (intf_t *i, struct intf_entry *entry, struct addr *src)
int intf_get_dst (intf_t *i, struct intf_entry *entry, struct addr *dst)
int intf_set (intf_t *i, const struct intf_entry *entry)
int intf_loop (intf_t *i, intf_handler callback, void *arg)
intf_tintf_close (intf_t *i)


Define Documentation

#define INTF_FLAG_BROADCAST   0x10
 

Definition at line 51 of file intf.h.

Referenced by _intf_set_type(), flags2string(), and intf_iff_to_flags().

#define INTF_FLAG_LOOPBACK   0x02
 

Definition at line 48 of file intf.h.

Referenced by _ifrow_to_entry(), _intf_set_type(), flags2string(), and intf_iff_to_flags().

#define INTF_FLAG_MULTICAST   0x20
 

Definition at line 52 of file intf.h.

Referenced by _ifrow_to_entry(), flags2string(), and intf_iff_to_flags().

#define INTF_FLAG_NOARP   0x08
 

Definition at line 50 of file intf.h.

Referenced by flags2string(), intf_flags_to_iff(), intf_iff_to_flags(), and intf_main().

#define INTF_FLAG_POINTOPOINT   0x04
 

Definition at line 49 of file intf.h.

Referenced by _intf_set_type(), flags2string(), intf_iff_to_flags(), and tun_open().

#define INTF_FLAG_UP   0x01
 

Definition at line 47 of file intf.h.

Referenced by _add_ip_intf(), _ifrow_to_entry(), flags2string(), intf_flags_to_iff(), intf_iff_to_flags(), intf_main(), and tun_open().

#define INTF_NAME_LEN   16
 

Definition at line 17 of file intf.h.

Referenced by _intf_get_aliases().

#define INTF_TYPE_ETH   6
 

Definition at line 36 of file intf.h.

Referenced by _add_ip_intf(), _ifcombo_type(), _intf_get_noalias(), and _intf_set_type().

#define INTF_TYPE_FDDI   15
 

Definition at line 38 of file intf.h.

Referenced by _ifcombo_type().

#define INTF_TYPE_LOOPBACK   24
 

Definition at line 40 of file intf.h.

Referenced by _ifcombo_type(), and _intf_set_type().

#define INTF_TYPE_OTHER   1
 

Definition at line 35 of file intf.h.

Referenced by _ifcombo_type(), and _intf_set_type().

#define INTF_TYPE_PPP   23
 

Definition at line 39 of file intf.h.

Referenced by _ifcombo_type().

#define INTF_TYPE_SLIP   28
 

Definition at line 41 of file intf.h.

Referenced by _ifcombo_type().

#define INTF_TYPE_TOKENRING   9
 

Definition at line 37 of file intf.h.

Referenced by _ifcombo_type().

#define INTF_TYPE_TUN   53
 

Definition at line 42 of file intf.h.

Referenced by _intf_get_noalias(), and _intf_set_type().


Typedef Documentation

typedef int(* intf_handler)(const struct intf_entry *entry, void *arg)
 

Definition at line 56 of file intf.h.

typedef struct intf_handle intf_t
 

Definition at line 54 of file intf.h.


Function Documentation

intf_t* intf_close intf_t i  ) 
 

Definition at line 339 of file intf-win32.c.

References NULL.

Referenced by __pyx_f_4dnet_4intf___dealloc__(), arp_close(), eth_open(), intf_main(), intf_open(), ip_close(), START_TEST(), and tun_close().

int intf_get intf_t i,
struct intf_entry entry
 

Definition at line 219 of file intf-win32.c.

References _intf_get_aliases(), _intf_get_noalias(), caddr_t, intf_handle::fd, intf_handle::ifc, and intf_handle::ifcbuf.

Referenced by __pyx_f_4dnet_4intf_get(), eth_open(), intf_main(), intf_set(), START_TEST(), and tun_open().

int intf_get_dst intf_t i,
struct intf_entry entry,
struct addr dst
 

Definition at line 265 of file intf-win32.c.

References _match_intf_src(), addr_ntos(), addr_ston(), addr::addr_type, ADDR_TYPE_IP, errno, intf_handle::fd, intf_entry::intf_addr, and intf_loop().

Referenced by __pyx_f_4dnet_4intf_get_dst(), and intf_main().

int intf_get_src intf_t i,
struct intf_entry entry,
struct addr src
 

Definition at line 237 of file intf-win32.c.

References _match_intf_src(), errno, intf_entry::intf_addr, intf_loop(), and memcpy.

Referenced by __pyx_f_4dnet_4intf_get_src(), and intf_main().

int intf_loop intf_t i,
intf_handler  callback,
void *  arg
 

Definition at line 318 of file intf-win32.c.

References _intf_get_aliases(), _intf_get_noalias(), caddr_t, ifreq::ifr_name, intf_entry::intf_len, intf_entry::intf_name, memset, NEXTIFR, NULL, and strlcpy.

Referenced by __pyx_f_4dnet_4intf_loop(), arp_add(), arp_get(), intf_get_dst(), intf_get_src(), intf_main(), and ip_open().

__BEGIN_DECLS intf_t* intf_open void   ) 
 

Definition at line 213 of file intf-win32.c.

References errno, intf, intf_close(), and NULL.

Referenced by __pyx_f_4dnet_4intf___init__(), arp_open(), eth_open(), intf_main(), ip_open(), START_TEST(), and tun_open().

int intf_set intf_t i,
const struct intf_entry entry
 

Definition at line 288 of file intf-win32.c.

References _intf_add_aliases(), _intf_delete_addrs(), _intf_delete_aliases(), addr_bcast(), addr::addr_bits, addr_btos(), addr_cmp(), addr_ntos(), addr::addr_type, ADDR_TYPE_ETH, ADDR_TYPE_IP, errno, ETH_ADDR_LEN, eth_close(), eth_open(), eth_set(), intf_handle::fd, intf_entry::intf_addr, intf_entry::intf_dst_addr, intf_entry::intf_flags, intf_flags_to_iff(), intf_get(), intf_entry::intf_len, intf_entry::intf_link_addr, intf_entry::intf_mtu, intf_entry::intf_name, memcpy, memset, NULL, and strlcpy.

Referenced by __pyx_f_4dnet_4intf_set(), intf_main(), tun_close(), and tun_open().


Generated on Sun May 14 14:51:21 2006 by  doxygen 1.4.2