#ifndef TRAFGEN_CONF #define TRAFGEN_CONF #include #include #include #define TYPE_INC 0 #define TYPE_DEC 1 enum csum { CSUM_IP, CSUM_UDP, CSUM_TCP, CSUM_UDP6, CSUM_TCP6, }; struct counter { int type; uint8_t min, max, inc, val; off_t off; }; struct randomizer { off_t off; }; struct csum16 { off_t off, from, to; enum csum which; }; struct packet { uint8_t *payload; size_t len; }; struct packet_dyn { struct counter *cnt; size_t clen; struct randomizer *rnd; size_t rlen; struct csum16 *csum; size_t slen; }; static inline bool packet_dyn_has_elems(struct packet_dyn *p) { return (p->clen || p->rlen || p->slen); } static inline bool packet_dyn_has_only_csums(struct packet_dyn *p) { return (p->clen == 0 && p->rlen == 0 && p->slen); } extern void compile_packets(char *file, bool verbose, unsigned int cpu, bool invoke_cpp); extern void cleanup_packets(void); #endif /* TRAFGEN_CONF */ 82721f3911b2619482e05910644e5699fbeb065'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-02-16 21:44:24 -0800
committerDavid S. Miller <davem@davemloft.net>2011-02-17 15:54:42 -0800
commit982721f3911b2619482e05910644e5699fbeb065 (patch)
tree217a326d3e362c84b92e4687fcd38f7766fc8655 /net/ipv4/fib_rules.c
parentb6bf3ca032c9cd517526178f579e7a4e395c6e45 (diff)
ipv4: Use const'ify fib_result deep in the route call chains.
The only troublesome bit here is __mkroute_output which wants to override res->fi and res->type, compute those in local variables instead. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_rules.c')