32#ifndef _NETGRAPH_NG_PATCH_H_
33#define _NETGRAPH_NG_PATCH_H_
36#define NG_PATCH_NODE_TYPE "patch"
39#define NGM_PATCH_COOKIE 1262445509
42#define NG_PATCH_HOOK_IN "in"
43#define NG_PATCH_HOOK_OUT "out"
46#define NG_PATCH_CSUM_IPV4 (CSUM_IP|CSUM_TCP|CSUM_UDP|CSUM_SCTP)
47#define NG_PATCH_CSUM_IPV6 (CSUM_TCP_IPV6|CSUM_UDP_IPV6|CSUM_SCTP_IPV6)
77#define NG_PATCH_CONFIG_TYPE { \
78 { "count", &ng_parse_uint32_type }, \
79 { "csum_flags", &ng_parse_uint64_type }, \
80 { "relative_offset", &ng_parse_uint32_type }, \
81 { "ops", &ng_patch_ops_array_type }, \
85#define NG_PATCH_OP_TYPE { \
86 { "offset", &ng_parse_uint32_type }, \
87 { "length", &ng_parse_uint16_type }, \
88 { "mode", &ng_parse_uint16_type }, \
89 { "value", &ng_parse_uint64_type }, \
93#define NG_PATCH_STATS_TYPE { \
94 { "Received", &ng_parse_uint64_type }, \
95 { "Patched", &ng_parse_uint64_type }, \
96 { "Dropped", &ng_parse_uint64_type }, \
132#define NG_PATCH_CONF_SIZE(count) (sizeof(struct ng_patch_config) + \
133 (count) * sizeof(struct ng_patch_op))
union ng_patch_op_val val