From be37e8cc1c91b327d3bcfd03e50fb08681d1df0f Mon Sep 17 00:00:00 2001 From: "/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=kaber/emailAddress=kaber@netfilter.org" Date: Tue, 6 Mar 2007 13:29:39 +0000 Subject: Add IPv6 support, fix a few incorrect key assignments and make sure this doesn't repeat by using symbolic names to make sure the assignment matches the array index. --- include/ulogd/ipfix_protocol.h | 2 +- include/ulogd/printpkt.h | 58 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 57 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/ulogd/ipfix_protocol.h b/include/ulogd/ipfix_protocol.h index 2bf1c3e..5d7e46a 100644 --- a/include/ulogd/ipfix_protocol.h +++ b/include/ulogd/ipfix_protocol.h @@ -64,7 +64,7 @@ enum { IPFIX_postPacketDeltaCount = 24, IPFIX_minimumPacketLength = 25, IPFIX_maximumPacketLength = 26, - IPFIX_sooureIPv6Address = 27, + IPFIX_sourceIPv6Address = 27, IPFIX_destinationIPv6Address = 28, IPFIX_sourceIPv6Mask = 29, IPFIX_destinationIPv6Mask = 30, diff --git a/include/ulogd/printpkt.h b/include/ulogd/printpkt.h index bdaeaa4..3db2862 100644 --- a/include/ulogd/printpkt.h +++ b/include/ulogd/printpkt.h @@ -1,8 +1,62 @@ #ifndef _PRINTPKT_H #define _PRINTPKT_H -#define INTR_IDS 35 -extern struct ulogd_key printpkt_keys[INTR_IDS]; +enum pkt_keys { + KEY_OOB_FAMILY, + KEY_OOB_TIME_SEC, + KEY_OOB_PREFIX, + KEY_OOB_IN, + KEY_OOB_OUT, + KEY_RAW_MAC, + KEY_RAW_MACLEN, + KEY_IP_SADDR, + KEY_IP_DADDR, + KEY_IP_TOTLEN, + KEY_IP_TOS, + KEY_IP_TTL, + KEY_IP_ID, + KEY_IP_FRAGOFF, + KEY_IP_PROTOCOL, + KEY_IP6_SADDR, + KEY_IP6_DADDR, + KEY_IP6_PAYLOAD_LEN, + KEY_IP6_PRIORITY, + KEY_IP6_HOPLIMIT, + KEY_IP6_FLOWLABEL, + KEY_IP6_NEXTHDR, + KEY_IP6_FRAG_OFF, + KEY_IP6_FRAG_ID, + KEY_TCP_SPORT, + KEY_TCP_DPORT, + KEY_TCP_SEQ, + KEY_TCP_ACKSEQ, + KEY_TCP_WINDOW, + KEY_TCP_SYN, + KEY_TCP_ACK, + KEY_TCP_PSH, + KEY_TCP_RST, + KEY_TCP_FIN, + KEY_TCP_URG, + KEY_TCP_URGP, + KEY_UDP_SPORT, + KEY_UDP_DPORT, + KEY_UDP_LEN, + KEY_ICMP_TYPE, + KEY_ICMP_CODE, + KEY_ICMP_ECHOID, + KEY_ICMP_ECHOSEQ, + KEY_ICMP_GATEWAY, + KEY_ICMP_FRAGMTU, + KEY_ICMPV6_TYPE, + KEY_ICMPV6_CODE, + KEY_ICMPV6_ECHOID, + KEY_ICMPV6_ECHOSEQ, + KEY_AHESP_SPI, + __PRINTPKT_KEYS +}; +#define PRINTPKT_KEYS (__PRINTPKT_KEYS) + +extern struct ulogd_key printpkt_keys[PRINTPKT_KEYS]; int printpkt_print(struct ulogd_key *res, char *buf); -- cgit v1.2.3