FreeBSD kernel IPv4 code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/ctype.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <netinet/in_systm.h>
#include <netinet/in.h>
#include <netinet/ip.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.
Macros | |
#define | FTP_CONTROL_PORT_NUMBER 21 |
#define | FTP_CONTROL_PORT_NUMBER 21 |
#define | MAX_MESSAGE_SIZE 128 |
#define | WAIT_CRLF 0x01 |
Enumerations | |
enum | ftp_message_type { FTP_PORT_COMMAND , FTP_EPRT_COMMAND , FTP_227_REPLY , FTP_229_REPLY , FTP_UNKNOWN_MESSAGE } |
Functions | |
__FBSDID ("$FreeBSD$") | |
static void | AliasHandleFtpOut (struct libalias *, struct ip *, struct alias_link *, int maxpacketsize) |
static void | AliasHandleFtpIn (struct libalias *, struct ip *, struct alias_link *) |
static int | fingerprint_out (struct libalias *la, struct alias_data *ah) |
static int | fingerprint_in (struct libalias *la, struct alias_data *ah) |
static int | protohandler_out (struct libalias *la, struct ip *pip, struct alias_data *ah) |
static int | protohandler_in (struct libalias *la, struct ip *pip, struct alias_data *ah) |
static int | mod_handler (module_t mod, int type, void *data) |
DECLARE_MODULE (alias_ftp, alias_mod, SI_SUB_DRIVERS, SI_ORDER_SECOND) | |
MODULE_VERSION (alias_ftp, 1) | |
MODULE_DEPEND (alias_ftp, libalias, 1, 1, 1) | |
static int | ParseFtpPortCommand (struct libalias *la, char *, int) |
static int | ParseFtpEprtCommand (struct libalias *la, char *, int) |
static int | ParseFtp227Reply (struct libalias *la, char *, int) |
static int | ParseFtp229Reply (struct libalias *la, char *, int) |
static void | NewFtpMessage (struct libalias *la, struct ip *, struct alias_link *, int, int) |
Variables | |
struct proto_handler | handlers [] |
static moduledata_t | alias_mod |
#define FTP_CONTROL_PORT_NUMBER 21 |
Definition at line 197 of file alias_ftp.c.
#define FTP_CONTROL_PORT_NUMBER 21 |
Definition at line 197 of file alias_ftp.c.
#define MAX_MESSAGE_SIZE 128 |
Definition at line 198 of file alias_ftp.c.
#define WAIT_CRLF 0x01 |
Definition at line 201 of file alias_ftp.c.
enum ftp_message_type |
Enumerator | |
---|---|
FTP_PORT_COMMAND | |
FTP_EPRT_COMMAND | |
FTP_227_REPLY | |
FTP_229_REPLY | |
FTP_UNKNOWN_MESSAGE |
Definition at line 203 of file alias_ftp.c.
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 281 of file alias_ftp.c.
References AddLink(), FTP_CONTROL_PORT_NUMBER, GET_ALIAS_PORT, GetAliasAddress(), GetOriginalAddress(), GetProtocolFlags(), ip::ip_hl, ip::ip_len, IPPROTO_TCP, MAX_MESSAGE_SIZE, ParseFtpEprtCommand(), ParseFtpPortCommand(), SetProtocolFlags(), libalias::true_addr, libalias::true_port, and WAIT_CRLF.
Referenced by protohandler_in().
|
static |
Definition at line 218 of file alias_ftp.c.
References FTP_227_REPLY, FTP_229_REPLY, FTP_CONTROL_PORT_NUMBER, FTP_EPRT_COMMAND, FTP_PORT_COMMAND, FTP_UNKNOWN_MESSAGE, GetProtocolFlags(), ip::ip_hl, ip::ip_len, MAX_MESSAGE_SIZE, NewFtpMessage(), ParseFtp227Reply(), ParseFtp229Reply(), ParseFtpEprtCommand(), ParseFtpPortCommand(), in_addr::s_addr, SetProtocolFlags(), libalias::true_addr, and WAIT_CRLF.
Referenced by protohandler_out().
DECLARE_MODULE | ( | alias_ftp | , |
alias_mod | , | ||
SI_SUB_DRIVERS | , | ||
SI_ORDER_SECOND | |||
) |
|
static |
Definition at line 122 of file alias_ftp.c.
References alias_data::dport, FTP_CONTROL_PORT_NUMBER, alias_data::lnk, and alias_data::sport.
|
static |
Definition at line 110 of file alias_ftp.c.
References alias_data::dport, FTP_CONTROL_PORT_NUMBER, alias_data::lnk, alias_data::maxpktsize, and alias_data::sport.
|
static |
Definition at line 165 of file alias_ftp.c.
References handlers, LibAliasAttachHandlers(), and LibAliasDetachHandlers().
MODULE_DEPEND | ( | alias_ftp | , |
libalias | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
MODULE_VERSION | ( | alias_ftp | , |
1 | |||
) |
|
static |
Definition at line 636 of file alias_ftp.c.
References AddLink(), AddSeq(), DifferentialChecksum(), FTP_227_REPLY, FTP_229_REPLY, FTP_EPRT_COMMAND, FTP_PORT_COMMAND, GET_ALIAS_PORT, GetAliasAddress(), GetAliasPort(), GetDeltaSeqOut(), GetDestAddress(), ip::ip_hl, ip::ip_len, ip::ip_sum, IPPROTO_TCP, alias_link::la, MAX_MESSAGE_SIZE, PunchFWHole(), in_addr::s_addr, SetAckModified(), libalias::true_addr, and libalias::true_port.
Referenced by AliasHandleFtpOut().
|
static |
Definition at line 494 of file alias_ftp.c.
References in_addr::s_addr, state, libalias::true_addr, and libalias::true_port.
Referenced by AliasHandleFtpOut().
|
static |
Definition at line 567 of file alias_ftp.c.
References state, and libalias::true_port.
Referenced by AliasHandleFtpOut().
|
static |
Definition at line 404 of file alias_ftp.c.
References in_addr::s_addr, state, libalias::true_addr, and libalias::true_port.
Referenced by AliasHandleFtpIn(), and AliasHandleFtpOut().
|
static |
Definition at line 331 of file alias_ftp.c.
References in_addr::s_addr, state, libalias::true_addr, and libalias::true_port.
Referenced by AliasHandleFtpIn(), and AliasHandleFtpOut().
|
static |
Definition at line 140 of file alias_ftp.c.
References AliasHandleFtpIn(), and alias_data::lnk.
|
static |
Definition at line 133 of file alias_ftp.c.
References AliasHandleFtpOut(), alias_data::lnk, and alias_data::maxpktsize.
|
static |
Definition at line 187 of file alias_ftp.c.
struct proto_handler handlers[] |
Definition at line 146 of file alias_ftp.c.
Referenced by mod_handler().