FreeBSD kernel IPv4 code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/limits.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <netinet/tcp.h>
#include <netinet/libalias/alias.h>
#include <netinet/libalias/alias_local.h>
#include <netinet/libalias/alias_mod.h>
Go to the source code of this file.
Data Structures | |
struct | grehdr |
struct | pptpMsgHead |
struct | pptpCodes |
struct | pptpCallIds |
Macros | |
#define | PPTP_CONTROL_PORT_NUMBER 1723 |
#define | PPTP_GRE_PROTO 0x880b |
#define | PPTP_INIT_VALUE ((0x2001 << 16) | PPTP_GRE_PROTO) |
#define | PPTP_INIT_MASK 0xef7fffff |
#define | PPTP_MAGIC 0x1a2b3c4d |
#define | PPTP_CTRL_MSG_TYPE 1 |
Typedefs | |
typedef struct grehdr | GreHdr |
typedef struct pptpMsgHead * | PptpMsgHead |
typedef struct pptpCodes * | PptpCode |
typedef struct pptpCallIds * | PptpCallId |
Enumerations | |
enum | { PPTP_StartCtrlConnRequest = 1 , PPTP_StartCtrlConnReply = 2 , PPTP_StopCtrlConnRequest = 3 , PPTP_StopCtrlConnReply = 4 , PPTP_EchoRequest = 5 , PPTP_EchoReply = 6 , PPTP_OutCallRequest = 7 , PPTP_OutCallReply = 8 , PPTP_InCallRequest = 9 , PPTP_InCallReply = 10 , PPTP_InCallConn = 11 , PPTP_CallClearRequest = 12 , PPTP_CallDiscNotify = 13 , PPTP_WanErrorNotify = 14 , PPTP_SetLinkInfo = 15 } |
Functions | |
__FBSDID ("$FreeBSD$") | |
static void | AliasHandlePptpOut (struct libalias *, struct ip *, struct alias_link *) |
static void | AliasHandlePptpIn (struct libalias *, struct ip *, struct alias_link *) |
static int | AliasHandlePptpGreOut (struct libalias *, struct ip *) |
static int | AliasHandlePptpGreIn (struct libalias *, struct ip *) |
static int | fingerprint (struct libalias *la, struct alias_data *ah) |
static int | fingerprintgre (struct libalias *la, struct alias_data *ah) |
static int | protohandlerin (struct libalias *la, struct ip *pip, struct alias_data *ah) |
static int | protohandlerout (struct libalias *la, struct ip *pip, struct alias_data *ah) |
static int | protohandlergrein (struct libalias *la, struct ip *pip, struct alias_data *ah) |
static int | protohandlergreout (struct libalias *la, struct ip *pip, struct alias_data *ah) |
static int | mod_handler (module_t mod, int type, void *data) |
DECLARE_MODULE (alias_pptp, alias_mod, SI_SUB_DRIVERS, SI_ORDER_SECOND) | |
MODULE_VERSION (alias_pptp, 1) | |
MODULE_DEPEND (alias_pptp, libalias, 1, 1, 1) | |
static PptpCallId | AliasVerifyPptp (struct ip *, u_int16_t *) |
Variables | |
struct proto_handler | handlers [] |
static moduledata_t | alias_mod |
#define PPTP_CONTROL_PORT_NUMBER 1723 |
Definition at line 67 of file alias_pptp.c.
#define PPTP_CTRL_MSG_TYPE 1 |
Definition at line 247 of file alias_pptp.c.
#define PPTP_GRE_PROTO 0x880b |
Definition at line 240 of file alias_pptp.c.
#define PPTP_INIT_MASK 0xef7fffff |
Definition at line 244 of file alias_pptp.c.
#define PPTP_INIT_VALUE ((0x2001 << 16) | PPTP_GRE_PROTO) |
Definition at line 243 of file alias_pptp.c.
#define PPTP_MAGIC 0x1a2b3c4d |
Definition at line 246 of file alias_pptp.c.
Definition at line 237 of file alias_pptp.c.
typedef struct pptpCallIds* PptpCallId |
Definition at line 287 of file alias_pptp.c.
Definition at line 281 of file alias_pptp.c.
typedef struct pptpMsgHead* PptpMsgHead |
Definition at line 275 of file alias_pptp.c.
anonymous enum |
Definition at line 249 of file alias_pptp.c.
__FBSDID | ( | "$FreeBSD$" | ) |
Definition at line 492 of file alias_pptp.c.
References DifferentialChecksum(), FindPptpInByPeerCallId(), GetOriginalAddress(), GetOriginalPort(), grehdr::gh_call_id, ip::ip_dst, ip::ip_sum, alias_link::la, PPTP_INIT_MASK, and PPTP_INIT_VALUE.
Referenced by protohandlergrein().
Definition at line 468 of file alias_pptp.c.
References DifferentialChecksum(), FindPptpOutByPeerCallId(), GetAliasAddress(), grehdr::gh_call_id, ip::ip_dst, ip::ip_sum, alias_link::la, PPTP_INIT_MASK, and PPTP_INIT_VALUE.
Referenced by protohandlergreout().
|
static |
Definition at line 364 of file alias_pptp.c.
References ADJUST_CHECKSUM, AliasVerifyPptp(), pptpCallIds::cid1, pptpCallIds::cid2, FindPptpInByCallId(), FindPptpInByPeerCallId(), GetAliasAddress(), GetDestAddress(), GetOriginalPort(), PPTP_CallDiscNotify, PPTP_InCallConn, PPTP_InCallReply, PPTP_OutCallReply, PPTP_SetLinkInfo, PPTP_WanErrorNotify, pptpCodes::resCode, SetDestCallId(), and SetExpire().
Referenced by protohandlerin().
|
static |
Definition at line 292 of file alias_pptp.c.
References AddPptp(), ADJUST_CHECKSUM, AliasVerifyPptp(), pptpCallIds::cid1, pptpCallIds::cid2, FindPptpOutByCallId(), GetAliasAddress(), GetAliasPort(), GetDestAddress(), GetOriginalAddress(), PPTP_CallClearRequest, PPTP_CallDiscNotify, PPTP_InCallReply, PPTP_InCallRequest, PPTP_OutCallReply, PPTP_OutCallRequest, pptpCodes::resCode, SetDestCallId(), and SetExpire().
Referenced by protohandlerout().
|
static |
Definition at line 431 of file alias_pptp.c.
References ip::ip_hl, ip::ip_len, pptpMsgHead::magic, pptpMsgHead::msgType, PPTP_CTRL_MSG_TYPE, PPTP_InCallReply, PPTP_MAGIC, PPTP_OutCallReply, and pptpMsgHead::type.
Referenced by AliasHandlePptpIn(), and AliasHandlePptpOut().
DECLARE_MODULE | ( | alias_pptp | , |
alias_mod | , | ||
SI_SUB_DRIVERS | , | ||
SI_ORDER_SECOND | |||
) |
|
static |
Definition at line 82 of file alias_pptp.c.
References alias_data::dport, alias_data::lnk, PPTP_CONTROL_PORT_NUMBER, and alias_data::sport.
|
static |
Definition at line 93 of file alias_pptp.c.
|
static |
Definition at line 167 of file alias_pptp.c.
References handlers, LibAliasAttachHandlers(), and LibAliasDetachHandlers().
MODULE_DEPEND | ( | alias_pptp | , |
libalias | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
MODULE_VERSION | ( | alias_pptp | , |
1 | |||
) |
|
static |
Definition at line 113 of file alias_pptp.c.
References AliasHandlePptpGreIn(), libalias::packetAliasMode, and PKT_ALIAS_PROXY_ONLY.
|
static |
Definition at line 122 of file alias_pptp.c.
References AliasHandlePptpGreOut().
|
static |
Definition at line 99 of file alias_pptp.c.
References AliasHandlePptpIn(), and alias_data::lnk.
|
static |
Definition at line 106 of file alias_pptp.c.
References AliasHandlePptpOut(), and alias_data::lnk.
|
static |
Definition at line 189 of file alias_pptp.c.
struct proto_handler handlers[] |
Definition at line 130 of file alias_pptp.c.
Referenced by mod_handler().