/[dynamips]/trunk/net_io_filter.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/net_io_filter.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12 - (show annotations)
Sat Oct 6 16:45:40 2007 UTC (11 years, 11 months ago) by dpavlin
File MIME type: text/plain
File size: 1044 byte(s)
make working copy

1 /*
2 * Cisco router simulation platform.
3 * Copyright (c) 2005,2006 Christophe Fillot (cf@utc.fr)
4 *
5 * NetIO Packet Filters.
6 */
7
8 #ifndef __NET_IO_FILTER_H__
9 #define __NET_IO_FILTER_H__
10
11 #include <sys/types.h>
12 #include <sys/socket.h>
13 #include <sys/un.h>
14 #include <pthread.h>
15 #include "utils.h"
16 #include "net_io.h"
17
18 /* Directions for filters */
19 #define NETIO_FILTER_DIR_RX 0
20 #define NETIO_FILTER_DIR_TX 1
21 #define NETIO_FILTER_DIR_BOTH 2
22
23 #ifdef GEN_ETH
24 struct netio_filter_capture {
25 pcap_t *desc;
26 pcap_dumper_t *dumper;
27 };
28 #endif
29
30 /* Find a filter */
31 netio_pktfilter_t *netio_filter_find(char *name);
32
33 /* Add a new filter */
34 int netio_filter_add(netio_pktfilter_t *pf);
35
36 /* Bind a filter to a NIO */
37 int netio_filter_bind(netio_desc_t *nio,int direction,char *pf_name);
38
39 /* Unbind a filter from a NIO */
40 int netio_filter_unbind(netio_desc_t *nio,int direction);
41
42 /* Setup a filter */
43 int netio_filter_setup(netio_desc_t *nio,int direction,int argc,char *argv[]);
44
45 /* Load all packet filters */
46 void netio_filter_load_all(void);
47
48 #endif

  ViewVC Help
Powered by ViewVC 1.1.26