/[dynamips]/upstream/dynamips-0.2.7-RC2/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

Annotation of /upstream/dynamips-0.2.7-RC2/net_io_filter.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (hide annotations)
Sat Oct 6 16:23:47 2007 UTC (16 years, 5 months ago) by dpavlin
Original Path: upstream/dynamips-0.2.7-RC1/net_io_filter.h
File MIME type: text/plain
File size: 1022 byte(s)
dynamips-0.2.7-RC1

1 dpavlin 1 /*
2 dpavlin 7 * Cisco router simulation platform.
3 dpavlin 1 * 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 dpavlin 7 #define NETIO_FILTER_DIR_BOTH 2
22 dpavlin 1
23 dpavlin 7 struct netio_filter_capture {
24     pcap_t *desc;
25     pcap_dumper_t *dumper;
26     };
27    
28 dpavlin 1 /* Find a filter */
29     netio_pktfilter_t *netio_filter_find(char *name);
30    
31     /* Add a new filter */
32     int netio_filter_add(netio_pktfilter_t *pf);
33    
34     /* Bind a filter to a NIO */
35     int netio_filter_bind(netio_desc_t *nio,int direction,char *pf_name);
36    
37     /* Unbind a filter from a NIO */
38     int netio_filter_unbind(netio_desc_t *nio,int direction);
39    
40     /* Setup a filter */
41     int netio_filter_setup(netio_desc_t *nio,int direction,int argc,char *argv[]);
42    
43     /* Load all packet filters */
44     void netio_filter_load_all(void);
45    
46     #endif

  ViewVC Help
Powered by ViewVC 1.1.26