FreeBSD kernel IPv4 code
|
Macros | |
#define | SN_ID 0x0000 |
#define | SN_INi 0x0010 |
#define | SN_INa 0x0020 |
#define | SN_UP 0x0100 |
#define | SN_CL 0x1000 |
#define | SN_RM 0x2000 |
Functions | |
static int | ProcessSctpMsg (struct libalias *la, int direction, struct sctp_nat_msg *sm, struct sctp_nat_assoc *assoc) |
Process SCTP message. More... | |
static int | ID_process (struct libalias *la, int direction, struct sctp_nat_assoc *assoc, struct sctp_nat_msg *sm) |
Process SCTP message while in the Idle state. More... | |
static int | INi_process (struct libalias *la, int direction, struct sctp_nat_assoc *assoc, struct sctp_nat_msg *sm) |
Process SCTP message while waiting for an INIT-ACK message. More... | |
static int | INa_process (struct libalias *la, int direction, struct sctp_nat_assoc *assoc, struct sctp_nat_msg *sm) |
Process SCTP message while waiting for an AddIp-ACK message. More... | |
static int | UP_process (struct libalias *la, int direction, struct sctp_nat_assoc *assoc, struct sctp_nat_msg *sm) |
Process SCTP messages while association is UP redirecting packets. More... | |
static int | CL_process (struct libalias *la, int direction, struct sctp_nat_assoc *assoc, struct sctp_nat_msg *sm) |
Process SCTP message while association is in the process of closing. More... | |
Defines the various states an association can be within the NAT
The SCTP NAT State Machine functions will:
#define SN_CL 0x1000 |
Closing state
Definition at line 257 of file alias_sctp.c.
#define SN_ID 0x0000 |
Idle state
Definition at line 253 of file alias_sctp.c.
#define SN_INa 0x0020 |
Initialising, waiting for AddIpAck state
Definition at line 255 of file alias_sctp.c.
#define SN_INi 0x0010 |
Initialising, waiting for InitAck state
Definition at line 254 of file alias_sctp.c.
#define SN_RM 0x2000 |
Removing state
Definition at line 258 of file alias_sctp.c.
#define SN_UP 0x0100 |
Association in UP state
Definition at line 256 of file alias_sctp.c.
|
static |
Process SCTP message while association is in the process of closing.
This function waits for a SHUT-COMP to close the association. Depending on the setting of sysctl_holddown_timer it may not remove the association immediately, but leave it up until SN_X_T(la). Only SHUT-COMP, SHUT-ACK, and ABORT packets are permitted in this state. All other packets are dropped.
la | Pointer to the relevant libalias instance |
direction | SN_TO_LOCAL | SN_TO_GLOBAL |
sm | Pointer to sctp message information |
assoc | Pointer to the association this SCTP Message belongs to |
Definition at line 1985 of file alias_sctp.c.
Referenced by ProcessSctpMsg().
|
static |
Process SCTP message while in the Idle state.
This function looks for an Incoming INIT or AddIP message.
All other SCTP messages are invalid when in SN_ID, and are dropped.
la | Pointer to the relevant libalias instance |
direction | SN_TO_LOCAL | SN_TO_GLOBAL |
sm | Pointer to sctp message information |
assoc | Pointer to the association this SCTP Message belongs to |
Definition at line 1772 of file alias_sctp.c.
Referenced by ProcessSctpMsg().
|
static |
Process SCTP message while waiting for an AddIp-ACK message.
Only an AddIP-ACK, resent AddIP, or an ABORT message are valid, all other SCTP packets are dropped
la | Pointer to the relevant libalias instance |
direction | SN_TO_LOCAL | SN_TO_GLOBAL |
sm | Pointer to sctp message information |
assoc | Pointer to the association this SCTP Message belongs to |
Definition at line 1893 of file alias_sctp.c.
Referenced by ProcessSctpMsg().
|
static |
Process SCTP message while waiting for an INIT-ACK message.
Only an INIT-ACK, resent INIT, or an ABORT SCTP packet are valid in this state, all other packets are dropped.
la | Pointer to the relevant libalias instance |
direction | SN_TO_LOCAL | SN_TO_GLOBAL |
sm | Pointer to sctp message information |
assoc | Pointer to the association this SCTP Message belongs to |
Definition at line 1841 of file alias_sctp.c.
Referenced by ProcessSctpMsg().
|
static |
Process SCTP message.
This function is the base state machine. It calls the processing engine for each state.
la | Pointer to the relevant libalias instance |
direction | SN_TO_LOCAL | SN_TO_GLOBAL |
sm | Pointer to sctp message information |
assoc | Pointer to the association this SCTP Message belongs to |
Definition at line 1734 of file alias_sctp.c.
References CL_process(), ID_process(), INa_process(), INi_process(), SN_CL, SN_ID, SN_INa, SN_INi, SN_NAT_PKT, SN_RM, SN_UP, sctp_nat_assoc::state, and UP_process().
|
static |
Process SCTP messages while association is UP redirecting packets.
While in the SN_UP state, all packets for the particular association are passed. Only a SHUT-ACK or an ABORT will cause a change of state.
la | Pointer to the relevant libalias instance |
direction | SN_TO_LOCAL | SN_TO_GLOBAL |
sm | Pointer to sctp message information |
assoc | Pointer to the association this SCTP Message belongs to |
Definition at line 1941 of file alias_sctp.c.
Referenced by ProcessSctpMsg().