#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/mbuf.h>
#include <sys/malloc.h>
#include <sys/endian.h>
#include <sys/errno.h>
#include <sys/syslog.h>
#include <contrib/zlib/zlib.h>
#include <netgraph/ng_message.h>
#include <netgraph/netgraph.h>
#include <netgraph/ng_parse.h>
#include <netgraph/ng_deflate.h>
#include "opt_netgraph.h"
Go to the source code of this file.
|
static | MALLOC_DEFINE (M_NETGRAPH_DEFLATE, "netgraph_deflate", "netgraph deflate node") |
|
static int | ng_deflate_compress (node_p, struct mbuf *, struct mbuf **) |
|
static int | ng_deflate_decompress (node_p, struct mbuf *, struct mbuf **) |
|
static void | ng_deflate_reset_req (node_p) |
|
| NETGRAPH_INIT (deflate, &ng_deflate_typestruct) |
|
| MODULE_DEPEND (ng_deflate, zlib, 1, 1, 1) |
|
static int | ng_deflate_constructor (node_p node) |
|
static int | ng_deflate_newhook (node_p node, hook_p hook, const char *name) |
|
static int | ng_deflate_rcvmsg (node_p node, item_p item, hook_p lasthook) |
|
static int | ng_deflate_rcvdata (hook_p hook, item_p item) |
|
static int | ng_deflate_shutdown (node_p node) |
|
static int | ng_deflate_disconnect (hook_p hook) |
|
◆ DEFLATE_BUF_SIZE
#define DEFLATE_BUF_SIZE 4096 |
◆ DEFLATE_HDRLEN
◆ ERROUT
#define ERROUT |
( |
|
x | ) |
do { error = (x); goto done; } while (0) |
◆ PROT_COMPD
#define PROT_COMPD 0x00fd |
◆ priv_p
◆ MALLOC_DEFINE()
static MALLOC_DEFINE |
( |
M_NETGRAPH_DEFLATE |
, |
|
|
"netgraph_deflate" |
, |
|
|
"netgraph deflate node" |
|
|
) |
| |
|
static |
◆ MODULE_DEPEND()
MODULE_DEPEND |
( |
ng_deflate |
, |
|
|
zlib |
, |
|
|
1 |
, |
|
|
1 |
, |
|
|
1 |
|
|
) |
| |
◆ NETGRAPH_INIT()
NETGRAPH_INIT |
( |
deflate |
, |
|
|
& |
ng_deflate_typestruct |
|
) |
| |
◆ ng_deflate_compress()
static int ng_deflate_compress |
( |
node_p |
node, |
|
|
struct mbuf * |
m, |
|
|
struct mbuf ** |
resultp |
|
) |
| |
|
static |
◆ ng_deflate_constructor()
static int ng_deflate_constructor |
( |
node_p |
node | ) |
|
|
static |
◆ ng_deflate_decompress()
static int ng_deflate_decompress |
( |
node_p |
node, |
|
|
struct mbuf * |
m, |
|
|
struct mbuf ** |
resultp |
|
) |
| |
|
static |
◆ ng_deflate_disconnect()
static int ng_deflate_disconnect |
( |
hook_p |
hook | ) |
|
|
static |
◆ ng_deflate_newhook()
static int ng_deflate_newhook |
( |
node_p |
node, |
|
|
hook_p |
hook, |
|
|
const char * |
name |
|
) |
| |
|
static |
◆ ng_deflate_rcvdata()
Definition at line 323 of file ng_deflate.c.
References ng_deflate_compress(), ng_deflate_decompress(), NG_FREE_ITEM, NG_FWD_NEW_DATA, NG_HOOK_NODE, NG_MKMESSAGE, NG_NODE_PRIVATE, NG_SEND_MSG_ID, NGI_GET_M, NGM_DEFLATE_COOKIE, and NGM_DEFLATE_RESETREQ.
◆ ng_deflate_rcvmsg()
Definition at line 213 of file ng_deflate.c.
References ng_mesg::ng_msghdr::arglen, ng_mesg::ng_msghdr::cmd, ng_mesg::data, ng_deflate_config::enable, ERROUT, ng_mesg::header, ng_deflate_reset_req(), NG_FREE_MSG, NG_MKRESPONSE, NG_NODE_PRIVATE, NG_RESPOND_MSG, NGI_GET_MSG, NGI_RETADDR, NGM_DEFLATE_CLR_STATS, NGM_DEFLATE_CONFIG, NGM_DEFLATE_COOKIE, NGM_DEFLATE_GET_STATS, NGM_DEFLATE_GETCLR_STATS, NGM_DEFLATE_RESETREQ, priv::stats, ng_mesg::ng_msghdr::typecookie, and ng_deflate_config::windowBits.
◆ ng_deflate_reset_req()
static void ng_deflate_reset_req |
( |
node_p |
node | ) |
|
|
static |
◆ ng_deflate_shutdown()
static int ng_deflate_shutdown |
( |
node_p |
node | ) |
|
|
static |
◆ ng_deflate_cmds
◆ ng_deflate_config_type
Initial value:= {
}
static const struct ng_parse_struct_field ng_deflate_config_type_fields[]
const struct ng_parse_type ng_parse_struct_type
Definition at line 92 of file ng_deflate.c.
◆ ng_deflate_config_type_fields
◆ ng_deflate_constructor
◆ ng_deflate_disconnect
◆ ng_deflate_newhook
◆ ng_deflate_rcvdata
◆ ng_deflate_rcvmsg
◆ ng_deflate_shutdown
◆ ng_deflate_stat_type
Initial value:= {
}
static const struct ng_parse_struct_field ng_deflate_stats_type_fields[]
Definition at line 100 of file ng_deflate.c.
◆ ng_deflate_stats_type_fields
◆ ng_deflate_typestruct
struct ng_type ng_deflate_typestruct |
|
static |
Initial value:= {
}
static ng_rcvdata_t ng_deflate_rcvdata
static ng_disconnect_t ng_deflate_disconnect
static ng_shutdown_t ng_deflate_shutdown
static const struct ng_cmdlist ng_deflate_cmds[]
static ng_constructor_t ng_deflate_constructor
static ng_newhook_t ng_deflate_newhook
static ng_rcvmsg_t ng_deflate_rcvmsg
#define NG_DEFLATE_NODE_TYPE
Definition at line 146 of file ng_deflate.c.