#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <arpa/inet.h>
#include <ulogd/ulogd.h>
#include <netinet/if_ether.h>
|
enum | input_keys {
INKEY_RAW_PCKT,
INKEY_RAW_PCKTLEN,
INKEY_OOB_FAMILY,
INKEY_OOB_PROTOCOL,
KEY_RAW_TYPE,
KEY_OOB_PROTOCOL,
KEY_RAW_MAC,
KEY_RAW_MACLEN,
KEY_RAW_MAC_SADDR,
KEY_RAW_MAC_ADDRLEN,
KEY_OOB_FAMILY,
KEY_OOB_PROTOCOL,
KEY_IP_SADDR,
START_KEY = KEY_IP_SADDR,
KEY_IP_DADDR,
KEY_ORIG_IP_SADDR,
KEY_ORIG_IP_DADDR,
KEY_REPLY_IP_SADDR,
KEY_REPLY_IP_DADDR,
MAX_KEY = KEY_REPLY_IP_DADDR,
KEY_OOB_FAMILY,
KEY_OOB_PROTOCOL,
KEY_IP_SADDR,
START_KEY = KEY_IP_SADDR,
KEY_IP_DADDR,
KEY_ORIG_IP_SADDR,
KEY_ORIG_IP_DADDR,
KEY_REPLY_IP_SADDR,
KEY_REPLY_IP_DADDR,
MAX_KEY = KEY_REPLY_IP_DADDR,
KEY_OOB_FAMILY,
KEY_OOB_PROTOCOL,
KEY_IP_SADDR,
START_KEY = KEY_IP_SADDR,
KEY_IP_DADDR,
KEY_ORIG_IP_SADDR,
KEY_ORIG_IP_DADDR,
KEY_REPLY_IP_SADDR,
KEY_REPLY_IP_DADDR,
KEY_ARP_SPA,
KEY_ARP_TPA,
MAX_KEY = KEY_ARP_TPA,
KEY_CT_MARK,
KEY_OOB_MARK,
MAX_KEY = KEY_OOB_MARK,
KEY_IP_SADDR,
KEY_IP_DADDR,
KEY_IP_PROTO,
KEY_L4_SPORT,
KEY_L4_DPORT,
KEY_RAW_PKTLEN,
KEY_RAW_PKTCNT,
KEY_ICMP_CODE,
KEY_ICMP_TYPE,
KEY_FLOW_START,
KEY_FLOW_END
} |
|
|
void | uint32_to_ipv6 (const uint32_t ipv4, struct in6_addr *ipv6) |
| Convert IPv4 address (as 32-bit unsigned integer) to IPv6 address: add 96 bits prefix "::ffff:" to get IPv6 address "::ffff:a.b.c.d". More...
|
|
void | __attribute__ ((constructor)) |
|
#define IPADDR_LENGTH 128 |
Enumerator |
---|
INKEY_RAW_PCKT |
|
INKEY_RAW_PCKTLEN |
|
INKEY_OOB_FAMILY |
|
INKEY_OOB_PROTOCOL |
|
KEY_RAW_TYPE |
|
KEY_OOB_PROTOCOL |
|
KEY_RAW_MAC |
|
KEY_RAW_MACLEN |
|
KEY_RAW_MAC_SADDR |
|
KEY_RAW_MAC_ADDRLEN |
|
KEY_OOB_FAMILY |
|
KEY_OOB_PROTOCOL |
|
KEY_IP_SADDR |
|
START_KEY |
|
KEY_IP_DADDR |
|
KEY_ORIG_IP_SADDR |
|
KEY_ORIG_IP_DADDR |
|
KEY_REPLY_IP_SADDR |
|
KEY_REPLY_IP_DADDR |
|
MAX_KEY |
|
KEY_OOB_FAMILY |
|
KEY_OOB_PROTOCOL |
|
KEY_IP_SADDR |
|
START_KEY |
|
KEY_IP_DADDR |
|
KEY_ORIG_IP_SADDR |
|
KEY_ORIG_IP_DADDR |
|
KEY_REPLY_IP_SADDR |
|
KEY_REPLY_IP_DADDR |
|
MAX_KEY |
|
KEY_OOB_FAMILY |
|
KEY_OOB_PROTOCOL |
|
KEY_IP_SADDR |
|
START_KEY |
|
KEY_IP_DADDR |
|
KEY_ORIG_IP_SADDR |
|
KEY_ORIG_IP_DADDR |
|
KEY_REPLY_IP_SADDR |
|
KEY_REPLY_IP_DADDR |
|
KEY_ARP_SPA |
|
KEY_ARP_TPA |
|
MAX_KEY |
|
KEY_CT_MARK |
|
KEY_OOB_MARK |
|
MAX_KEY |
|
KEY_IP_SADDR |
|
KEY_IP_DADDR |
|
KEY_IP_PROTO |
|
KEY_L4_SPORT |
|
KEY_L4_DPORT |
|
KEY_RAW_PKTLEN |
|
KEY_RAW_PKTCNT |
|
KEY_ICMP_CODE |
|
KEY_ICMP_TYPE |
|
KEY_FLOW_START |
|
KEY_FLOW_END |
|
void __attribute__ |
( |
(constructor) |
| ) |
|
void uint32_to_ipv6 |
( |
const uint32_t |
ipv4, |
|
|
struct in6_addr * |
ipv6 |
|
) |
| |
|
inline |
Convert IPv4 address (as 32-bit unsigned integer) to IPv6 address: add 96 bits prefix "::ffff:" to get IPv6 address "::ffff:a.b.c.d".