All Files Functions Variables Enumerator Macros Groups Pages
Functions | Variables
nfhook.c File Reference

Packet Monitor implementation. More...

#include <linux/netfilter_ipv4.h>
#include <linux/inetdevice.h>
#include <linux/inet.h>
#include <net/route.h>
#include "rom.h"

Go to the source code of this file.


static void init_whitelist (void)
 Build the whitelist.
unsigned int hook_func (unsigned int hooknum, struct sk_buff *skb, const struct net_device *in, const struct net_device *out, int(*okfn)(struct sk_buff *))
 unsigned int hook_func description
int nfhook_init (void)
 nfhook_init description
void nfhook_exit (void)
 nfhook_exit description


static struct t_id whitelist [WHITELIST_SIZE+1]
 The whitelist contains all IPv4 addresses of this host.

Detailed Description

Packet Monitor implementation.

Carsten.Vogel | Mohamad.Sbeiti

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. For further information see file COPYING in the top level directory

This work is part of the secure wireless mesh networks framework, which is currently under development by CNI

Definition in file nfhook.c.

Function Documentation

unsigned int hook_func ( unsigned int  hooknum,
struct sk_buff *  skb,
const struct net_device *  in,
const struct net_device *  out,
int(*)(struct sk_buff *)  okfn 

unsigned int hook_func description


Definition at line 156 of file nfhook.c.

References DEBUG_ROM, ipv4_has_valid_route(), queue_packet_handler(), send_rom_rlife(), and whitelist.

Referenced by nfhook_init().

static void init_whitelist ( void  )

Build the whitelist.

We loop through all existing network devices to get their IPv4 and broadcast addresses

Definition at line 44 of file nfhook.c.

References whitelist, and WHITELIST_SIZE.

Referenced by nfhook_init().

Variable Documentation

struct t_id whitelist[WHITELIST_SIZE+1]

The whitelist contains all IPv4 addresses of this host.

It is used to filter out all packets which are destined for this host as early as possible

Definition at line 37 of file nfhook.c.

Referenced by hook_func(), and init_whitelist().