Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/libalias/alias_local.h
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | |||||
#define INADDR_NONE 0xffffffff | #define INADDR_NONE 0xffffffff | ||||
#include <netinet/libalias/alias_sctp.h> | #include <netinet/libalias/alias_sctp.h> | ||||
#else | #else | ||||
#include "alias_sctp.h" | #include "alias_sctp.h" | ||||
#endif | #endif | ||||
/* Sizes of input and output link tables */ | /* Sizes of input and output link tables */ | ||||
#define LINK_TABLE_IN_SIZE 4001 | |||||
#define GET_ALIAS_PORT -1 | #define GET_ALIAS_PORT -1 | ||||
#define GET_ALIAS_ID GET_ALIAS_PORT | #define GET_ALIAS_ID GET_ALIAS_PORT | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#define INET_NTOA_BUF(buf) (buf) | #define INET_NTOA_BUF(buf) (buf) | ||||
#else | #else | ||||
#define INET_NTOA_BUF(buf) (buf), sizeof(buf) | #define INET_NTOA_BUF(buf) (buf), sizeof(buf) | ||||
#endif | #endif | ||||
struct proxy_entry; | struct proxy_entry; | ||||
struct group_in { | struct group_in { | ||||
struct in_addr alias_addr; | struct in_addr alias_addr; | ||||
u_short alias_port; | u_short alias_port; | ||||
int link_type; | int link_type; | ||||
LIST_ENTRY(group_in) group_in; | SPLAY_ENTRY(group_in) in; | ||||
LIST_HEAD(, alias_link) full, partial; | LIST_HEAD(, alias_link) full, partial; | ||||
}; | }; | ||||
struct libalias { | struct libalias { | ||||
LIST_ENTRY(libalias) instancelist; | LIST_ENTRY(libalias) instancelist; | ||||
/* Mode flags documented in alias.h */ | /* Mode flags documented in alias.h */ | ||||
int packetAliasMode; | int packetAliasMode; | ||||
/* Address written onto source field of IP packet. */ | /* Address written onto source field of IP packet. */ | ||||
struct in_addr aliasAddress; | struct in_addr aliasAddress; | ||||
/* IP address incoming packets are sent to | /* IP address incoming packets are sent to | ||||
* if no aliasing link already exists */ | * if no aliasing link already exists */ | ||||
struct in_addr targetAddress; | struct in_addr targetAddress; | ||||
/* Lookup table of pointers to chains of link records. | /* Lookup table of pointers to chains of link records. | ||||
* Each link record is doubly indexed into input and | * Each link record is doubly indexed into input and | ||||
* output lookup tables. */ | * output lookup tables. */ | ||||
SPLAY_HEAD(splay_out, alias_link) linkSplayOut; | SPLAY_HEAD(splay_out, alias_link) linkSplayOut; | ||||
LIST_HEAD (, group_in) groupTableIn[LINK_TABLE_IN_SIZE]; | SPLAY_HEAD(splay_in, group_in) linkSplayIn; | ||||
LIST_HEAD (, alias_link) pptpList; | LIST_HEAD (, alias_link) pptpList; | ||||
/* HouseKeeping */ | /* HouseKeeping */ | ||||
TAILQ_HEAD (, alias_link) checkExpire; | TAILQ_HEAD (, alias_link) checkExpire; | ||||
/* Link statistics */ | /* Link statistics */ | ||||
unsigned int icmpLinkCount; | unsigned int icmpLinkCount; | ||||
unsigned int udpLinkCount; | unsigned int udpLinkCount; | ||||
unsigned int tcpLinkCount; | unsigned int tcpLinkCount; | ||||
unsigned int pptpLinkCount; | unsigned int pptpLinkCount; | ||||
▲ Show 20 Lines • Show All 272 Lines • Show Last 20 Lines |