Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

etherdevice.h

Go to the documentation of this file.
00001 /*
00002  * INET         An implementation of the TCP/IP protocol suite for the LINUX
00003  *              operating system.  NET  is implemented using the  BSD Socket
00004  *              interface as the means of communication with the user level.
00005  *
00006  *              Definitions for the Ethernet handlers.
00007  *
00008  * Version:     @(#)eth.h       1.0.4   05/13/93
00009  *
00010  * Authors:     Ross Biro, <bir7@leland.Stanford.Edu>
00011  *              Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
00012  *
00013  *              Relocated to include/linux where it belongs by Alan Cox 
00014  *                                                      <gw4pts@gw4pts.ampr.org>
00015  *
00016  *              This program is free software; you can redistribute it and/or
00017  *              modify it under the terms of the GNU General Public License
00018  *              as published by the Free Software Foundation; either version
00019  *              2 of the License, or (at your option) any later version.
00020  *
00021  *      WARNING: This move may well be temporary. This file will get merged with others RSN.
00022  *
00023  */
00024 #ifndef _LINUX_ETHERDEVICE_H
00025 #define _LINUX_ETHERDEVICE_H
00026 
00027 #include <linux/config.h>
00028 #include <linux/if_ether.h>
00029 
00030 #ifdef __KERNEL__
00031 extern int              eth_header(struct sk_buff *skb, struct device *dev,
00032                                    unsigned short type, void *daddr,
00033                                    void *saddr, unsigned len);
00034 extern int              eth_rebuild_header(struct sk_buff *skb);
00035 extern unsigned short   eth_type_trans(struct sk_buff *skb, struct device *dev);
00036 extern void             eth_header_cache_update(struct hh_cache *hh, struct device *dev,
00037                                                 unsigned char * haddr);
00038 extern int              eth_header_cache(struct neighbour *neigh,
00039                                          struct hh_cache *hh);
00040 extern int              eth_header_parse(struct sk_buff *skb,
00041                                          unsigned char *haddr);
00042 extern struct device    * init_etherdev(struct device *, int);
00043 
00044 #ifdef CONFIG_IP_ROUTER
00045 static __inline__ void eth_copy_and_sum (struct sk_buff *dest, unsigned char *src, int len, int base)
00046 {
00047     memcpy (dest->data, src, len);
00048 }
00049 #else
00050 extern void             eth_copy_and_sum(struct sk_buff *dest,
00051                                 unsigned char *src, int length, int base);
00052 #endif
00053 
00054 #endif
00055 
00056 #endif  /* _LINUX_ETHERDEVICE_H */