A
download ethertypes.h
Language: C
License: GPL
LOC: 21
Project Info
IPgrab
Server: SourceForge
Type: cvs
...i\ipgrab\ipgrab\IPgrab\src\
   ah.c
   ah.h
   arp.c
   arp.h
   bgp.c
   bgp.h
   cbcp.c
   cbcp.h
   ccp.c
   ccp.h
   chap.c
   chap.h
   datalink.c
   datalink.h
   dhcp.c
   dhcp.h
   display.c
   display.h
   dns.c
   dns.h
   dynports.c
   dynports.h
   error.c
   error.h
   esp.c
   esp.h
   ethernet.c
   ethernet.h
   ethertypes.c
   ethertypes.h
   file.c
   file.h
   ftpctrl.c
   ftpctrl.h
   getopt.c
   getopt.h
   global.h
   gre.c
   gre.h
   hexbuffer.c
   hexbuffer.h
   http.c
   http.h
   iana.c
   iana.h
   icmp.c
   icmp.h
   icmpv6.c
   icmpv6.h
   igmp.c
   igmp.h
   ip.c
   ip.h
   ip_protocols.c
   ip_protocols.h
   ip_services.c
   ip_services.h
   ipcp.c
   ipcp.h
   ipgrab.c
   ipgrab.h
   ipgsnmp.h
   ipv6.c
   ipv6.h
   ipx.c
   ipx.h
   ipxrip.c
   ipxrip.h
   isakmp.c
   isakmp.h
   l2tp.c
   l2tp.h
   layers.c
   layers.h
   lcp.c
   lcp.h
   llc.c
   llc.h
   local.h
   loopback.c
   loopback.h
   Makefile.am
   Makefile.in
   mgcp.c
   mgcp.h
   mobileip.c
   mobileip.h
   mppc.c
   mppc.h
   netbios_ns.c
   netbios_ns.h
   nntp.c
   nntp.h
   ns_labels.c
   ns_labels.h
   open_pcap.c
   open_pcap.h
   ospf.c
   ospf.h
   packet_manip.c
   packet_manip.h
   padding.c
   padding.h
   parse_cl.c
   parse_cl.h
   payload.c
   payload.h
   ppp.c
   ppp.h
   pppoe.c
   pppoe.h
   pptp.c
   pptp.h
   protocols.h
   radius.c
   radius.h
   radius_3gpp2.c
   radius_3gpp2.h
   raw.c
   raw.h
   rip.c
   rip.h
   ripng.c
   ripng.h
   rsip.c
   rsip.h
   rsvp.c
   rsvp.h
   rtcp.c
   rtcp.h
   rtp.c
   rtp.h
   sdp.c
   sdp.h
   sip.c
   sip.h
   slip.c
   slip.h
   slp.c
   slp.h
   snmp.c
   spx.c
   spx.h
   ssh.c
   ssh.h
   state.c
   state.h
   stats.c
   stats.h
   strmap.c
   strmap.h
   tcp.c
   tcp.h
   template.c
   template.h
   tftp.c
   tftp.h
   udp.c
   udp.h
   utilities.c
   utilities.h

/**************************************************************************** 
** File: ethertypes.h
**
** Author: Mike Borella
**
** Comments: Header file for ethernet types
**
** $Id: ethertypes.h,v 1.5 2001/03/28 18:34:42 mborella Exp $
**
** 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.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU Library General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
*****************************************************************************/

#ifndef ETHERTYPES_H
#define ETHERTYPES_H

#include "global.h"
#include "ip.h"
#include "ipv6.h"
#include "arp.h"
#include "ipx.h"
#include "ppp.h"
#include "pppoe.h"

#define ETHERTYPE_IP        0x0800  /* IPv4 */
#define ETHERTYPE_ARP       0x0806  /* Addr. resolution protocol */
#define ETHERTYPE_RARP      0x8035  /* Reverse addr. resolution protocol */
#define ETHERTYPE_IPX       0x8137  /* IPX family */
#define ETHERTYPE_IPV6      0x86dd  /* IPv6 */
#define ETHERTYPE_PPP       0x880b  /* PPP */
#define ETHERTYPE_PPPOED    0x8863  /* PPPoE discovery */
#define ETHERTYPE_PPPOES    0x8864  /* PPPoE session */
#define ETHERTYPE_PPPHDLC   0x8881  /* CDMA2000 PPP with HDLC framing in GRE */

/*
 * Define a type that is a function that takes a packet_t pointer and 
 * returns a void 
 */

typedef void (*ethertype_func_t)(packet_t *);

/*
 * This function maps a ethertype to a function that processes the 
 * protocol that runs on that ethertype
 */

ethertype_func_t ethertype2func(u_int16_t);


#endif



About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us