summaryrefslogtreecommitdiffstats
path: root/filter/raw2packet/ulogd_raw2packet_BASE.c
diff options
context:
space:
mode:
Diffstat (limited to 'filter/raw2packet/ulogd_raw2packet_BASE.c')
-rw-r--r--filter/raw2packet/ulogd_raw2packet_BASE.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/filter/raw2packet/ulogd_raw2packet_BASE.c b/filter/raw2packet/ulogd_raw2packet_BASE.c
index ad894fc..8a6180c 100644
--- a/filter/raw2packet/ulogd_raw2packet_BASE.c
+++ b/filter/raw2packet/ulogd_raw2packet_BASE.c
@@ -44,6 +44,7 @@
#include <ulogd/ipfix_protocol.h>
#include <netinet/if_ether.h>
#include <string.h>
+#include <linux/types.h>
enum input_keys {
INKEY_RAW_PCKT,
@@ -538,7 +539,7 @@ static struct ulogd_key iphdr_rets[] = {
***********************************************************************/
static int _interp_tcp(struct ulogd_pluginstance *pi, struct tcphdr *tcph,
- u_int32_t len)
+ uint32_t len)
{
struct ulogd_key *ret = pi->output.keys;
@@ -573,7 +574,7 @@ static int _interp_tcp(struct ulogd_pluginstance *pi, struct tcphdr *tcph,
***********************************************************************/
static int _interp_udp(struct ulogd_pluginstance *pi, struct udphdr *udph,
- u_int32_t len)
+ uint32_t len)
{
struct ulogd_key *ret = pi->output.keys;
@@ -602,7 +603,7 @@ typedef struct sctphdr {
} __attribute__((packed)) sctp_sctphdr_t;
static int _interp_sctp(struct ulogd_pluginstance *pi, struct sctphdr *sctph,
- u_int32_t len)
+ uint32_t len)
{
struct ulogd_key *ret = pi->output.keys;
@@ -625,7 +626,7 @@ static int _interp_sctp(struct ulogd_pluginstance *pi, struct sctphdr *sctph,
***********************************************************************/
static int _interp_icmp(struct ulogd_pluginstance *pi, struct icmphdr *icmph,
- u_int32_t len)
+ uint32_t len)
{
struct ulogd_key *ret = pi->output.keys;
@@ -663,7 +664,7 @@ static int _interp_icmp(struct ulogd_pluginstance *pi, struct icmphdr *icmph,
***********************************************************************/
static int _interp_icmpv6(struct ulogd_pluginstance *pi, struct icmp6_hdr *icmph,
- u_int32_t len)
+ uint32_t len)
{
struct ulogd_key *ret = pi->output.keys;
@@ -691,7 +692,7 @@ static int _interp_icmpv6(struct ulogd_pluginstance *pi, struct icmp6_hdr *icmph
* IPSEC HEADER
***********************************************************************/
static int _interp_ahesp(struct ulogd_pluginstance *pi, void *protoh,
- u_int32_t len)
+ uint32_t len)
{
#if 0
struct ulogd_key *ret = pi->output.keys;
@@ -711,14 +712,14 @@ static int _interp_ahesp(struct ulogd_pluginstance *pi, void *protoh,
* IP HEADER
***********************************************************************/
-static int _interp_iphdr(struct ulogd_pluginstance *pi, u_int32_t len)
+static int _interp_iphdr(struct ulogd_pluginstance *pi, uint32_t len)
{
struct ulogd_key *ret = pi->output.keys;
struct iphdr *iph =
ikey_get_ptr(&pi->input.keys[INKEY_RAW_PCKT]);
- void *nexthdr = (u_int32_t *)iph + iph->ihl;
+ void *nexthdr = (uint32_t *)iph + iph->ihl;
- if (len < sizeof(struct iphdr) || len <= (u_int32_t)(iph->ihl * 4))
+ if (len < sizeof(struct iphdr) || len <= (uint32_t)(iph->ihl * 4))
return ULOGD_IRET_OK;
len -= iph->ihl * 4;
@@ -759,7 +760,7 @@ static int _interp_iphdr(struct ulogd_pluginstance *pi, u_int32_t len)
* IPv6 HEADER
***********************************************************************/
-static int ip6_ext_hdr(u_int8_t nexthdr)
+static int ip6_ext_hdr(uint8_t nexthdr)
{
switch (nexthdr) {
case IPPROTO_HOPOPTS:
@@ -774,12 +775,12 @@ static int ip6_ext_hdr(u_int8_t nexthdr)
}
}
-static int _interp_ipv6hdr(struct ulogd_pluginstance *pi, u_int32_t len)
+static int _interp_ipv6hdr(struct ulogd_pluginstance *pi, uint32_t len)
{
struct ulogd_key *ret = pi->output.keys;
struct ip6_hdr *ipv6h = ikey_get_ptr(&pi->input.keys[INKEY_RAW_PCKT]);
unsigned int ptr, hdrlen = 0;
- u_int8_t curhdr;
+ uint8_t curhdr;
int fragment = 0;
if (len < sizeof(struct ip6_hdr))
@@ -889,7 +890,7 @@ out:
/***********************************************************************
* ARP HEADER
***********************************************************************/
-static int _interp_arp(struct ulogd_pluginstance *pi, u_int32_t len)
+static int _interp_arp(struct ulogd_pluginstance *pi, uint32_t len)
{
struct ulogd_key *ret = pi->output.keys;
const struct ether_arp *arph =
@@ -914,9 +915,9 @@ static int _interp_arp(struct ulogd_pluginstance *pi, u_int32_t len)
* ETHER HEADER
***********************************************************************/
-static int _interp_bridge(struct ulogd_pluginstance *pi, u_int32_t len)
+static int _interp_bridge(struct ulogd_pluginstance *pi, uint32_t len)
{
- const u_int16_t proto =
+ const uint16_t proto =
ikey_get_u16(&pi->input.keys[INKEY_OOB_PROTOCOL]);
switch (proto) {
@@ -938,8 +939,8 @@ static int _interp_bridge(struct ulogd_pluginstance *pi, u_int32_t len)
static int _interp_pkt(struct ulogd_pluginstance *pi)
{
- u_int32_t len = ikey_get_u32(&pi->input.keys[INKEY_RAW_PCKTLEN]);
- u_int8_t family = ikey_get_u8(&pi->input.keys[INKEY_OOB_FAMILY]);
+ uint32_t len = ikey_get_u32(&pi->input.keys[INKEY_RAW_PCKTLEN]);
+ uint8_t family = ikey_get_u8(&pi->input.keys[INKEY_OOB_FAMILY]);
struct ulogd_key *ret = pi->output.keys;
okey_set_u16(&ret[KEY_OOB_PROTOCOL],