Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/libalias/alias_local.h
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
* Initial version: August, 1996 (cjm) | * Initial version: August, 1996 (cjm) | ||||
* | * | ||||
* <updated several times by original author and Eivind Eklund> | * <updated several times by original author and Eivind Eklund> | ||||
*/ | */ | ||||
#ifndef _ALIAS_LOCAL_H_ | #ifndef _ALIAS_LOCAL_H_ | ||||
#define _ALIAS_LOCAL_H_ | #define _ALIAS_LOCAL_H_ | ||||
#include <sys/tree.h> | |||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
/* XXX: LibAliasSetTarget() uses this constant. */ | /* XXX: LibAliasSetTarget() uses this constant. */ | ||||
#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_OUT_SIZE 4001 | |||||
#define LINK_TABLE_IN_SIZE 4001 | #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 | ||||
Show All 17 Lines | struct libalias { | ||||
/* 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. */ | ||||
LIST_HEAD (, alias_link) linkTableOut[LINK_TABLE_OUT_SIZE]; | SPLAY_HEAD(splay_out, alias_link) linkSplayOut; | ||||
LIST_HEAD (, group_in) groupTableIn[LINK_TABLE_IN_SIZE]; | LIST_HEAD (, group_in) groupTableIn[LINK_TABLE_IN_SIZE]; | ||||
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 */ | ||||
int icmpLinkCount; | int icmpLinkCount; | ||||
int udpLinkCount; | int udpLinkCount; | ||||
int tcpLinkCount; | int tcpLinkCount; | ||||
▲ Show 20 Lines • Show All 282 Lines • Show Last 20 Lines |