/[dynamips]/upstream/dynamips-0.2.6-RC3/gen_eth.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.6-RC3/gen_eth.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4 - (hide annotations)
Sat Oct 6 16:06:49 2007 UTC (16 years, 5 months ago) by dpavlin
File MIME type: text/plain
File size: 703 byte(s)
dynamips-0.2.6-RC3

1 dpavlin 1 /*
2     * Copyright (c) 2006 Christophe Fillot.
3     * E-mail: cf@utc.fr
4     *
5     * gen_eth: module used to send/receive Ethernet packets.
6     *
7     * Use libpcap (0.9+) to receive and send packets.
8     */
9    
10     #ifndef __GEN_ETH_H__
11     #define __GEN_ETH_H__ 1
12    
13     #include <sys/types.h>
14     #include <pcap.h>
15    
16     /* Initialize a generic ethernet driver */
17     pcap_t *gen_eth_init(char *device);
18    
19     /* Free resources of a generic ethernet driver */
20     void gen_eth_close(pcap_t *p);
21    
22     /* Send an ethernet frame */
23     ssize_t gen_eth_send(pcap_t *p,char *buffer,size_t len);
24    
25     /* Receive an ethernet frame */
26     ssize_t gen_eth_recv(pcap_t *p,char *buffer,size_t len);
27    
28     /* Display Ethernet interfaces of the system */
29     int gen_eth_show_dev_list(void);
30    
31     #endif

  ViewVC Help
Powered by ViewVC 1.1.26