#include <sys/param.h>
#include <sys/systm.h>
#include <sys/endian.h>
#include <sys/errno.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <netgraph/ng_message.h>
#include <netgraph/netgraph.h>
#include <netgraph/ng_parse.h>
#include <netgraph/ng_tcpmss.h>
Go to the source code of this file.
◆ ERROUT
#define ERROUT |
( |
|
x | ) |
{ error = (x); goto done; } |
◆ M_CHECK
Value: do { \
if ((m)->m_pkthdr.len < pullup_len) \
goto send; \
if ((m)->m_len < pullup_len && \
(((m) = m_pullup((m), pullup_len)) == NULL)) \
ERROUT(ENOBUFS); \
} while (0)
◆ TCPMSS_ADJUST_CHECKSUM
#define TCPMSS_ADJUST_CHECKSUM |
( |
|
acc, |
|
|
|
cksum |
|
) |
| |
Value: do { \
acc += cksum; \
if (acc < 0) { \
acc = -acc; \
acc = (acc >> 16) + (acc & 0xffff); \
acc += acc >> 16; \
cksum = (u_short) ~acc; \
} else { \
acc = (acc >> 16) + (acc & 0xffff); \
acc += acc >> 16; \
cksum = (u_short) acc; \
} \
} while (0);
Definition at line 396 of file ng_tcpmss.c.
◆ correct_mss()
static int correct_mss |
( |
struct tcphdr * |
tc, |
|
|
int |
hlen, |
|
|
uint16_t |
maxmss, |
|
|
int |
flags |
|
) |
| |
|
static |
◆ NETGRAPH_INIT()
NETGRAPH_INIT |
( |
tcpmss |
, |
|
|
& |
ng_tcpmss_typestruct |
|
) |
| |
◆ ng_tcpmss_constructor()
static int ng_tcpmss_constructor |
( |
node_p |
node | ) |
|
|
static |
◆ ng_tcpmss_disconnect()
static int ng_tcpmss_disconnect |
( |
hook_p |
hook | ) |
|
|
static |
◆ ng_tcpmss_newhook()
static int ng_tcpmss_newhook |
( |
node_p |
node, |
|
|
hook_p |
hook, |
|
|
const char * |
name |
|
) |
| |
|
static |
◆ ng_tcpmss_rcvdata()
◆ ng_tcpmss_rcvmsg()
Definition at line 177 of file ng_tcpmss.c.
References ng_mesg::ng_msghdr::arglen, ng_mesg::ng_msghdr::cmd, ng_mesg::data, ERROUT, ng_mesg::header, ng_tcpmss_config::inHook, ng_tcpmss_config::maxMSS, ng_findhook(), NG_FREE_MSG, NG_HOOK_PRIVATE, NG_HOOKSIZ, NG_MKRESPONSE, NG_RESPOND_MSG, NGI_GET_MSG, NGM_TCPMSS_CLR_STATS, NGM_TCPMSS_CONFIG, NGM_TCPMSS_COOKIE, NGM_TCPMSS_GET_STATS, NGM_TCPMSS_GETCLR_STATS, ng_tcpmss_config::outHook, priv::stats, and ng_mesg::ng_msghdr::typecookie.
◆ ng_tcpmss_cmds
◆ ng_tcpmss_config_type
Initial value:= {
}
const struct ng_parse_type ng_parse_struct_type
static const struct ng_parse_struct_field ng_tcpmss_config_type_fields[]
Definition at line 94 of file ng_tcpmss.c.
◆ ng_tcpmss_config_type_fields
◆ ng_tcpmss_constructor
◆ ng_tcpmss_disconnect
◆ ng_tcpmss_hookstat_type
Initial value:= {
}
static const struct ng_parse_struct_field ng_tcpmss_hookstat_type_fields[]
Definition at line 86 of file ng_tcpmss.c.
◆ ng_tcpmss_hookstat_type_fields
◆ ng_tcpmss_newhook
◆ ng_tcpmss_rcvdata
◆ ng_tcpmss_rcvmsg
◆ ng_tcpmss_typestruct
struct ng_type ng_tcpmss_typestruct |
|
static |
Initial value:= {
}
static ng_newhook_t ng_tcpmss_newhook
static ng_constructor_t ng_tcpmss_constructor
static ng_rcvmsg_t ng_tcpmss_rcvmsg
static ng_disconnect_t ng_tcpmss_disconnect
static ng_rcvdata_t ng_tcpmss_rcvdata
static const struct ng_cmdlist ng_tcpmss_cmds[]
#define NG_TCPMSS_NODE_TYPE
Definition at line 133 of file ng_tcpmss.c.