Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
net.c File Reference
#include <linux/bug.h>
#include <linux/compiler.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/ethtool.h>
#include <linux/firewire.h>
#include <linux/firewire-constants.h>
#include <linux/highmem.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/jiffies.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/mutex.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <asm/unaligned.h>
#include <net/arp.h>

Go to the source code of this file.

Data Structures

struct  rfc2734_arp
 
struct  fwnet_header
 
struct  rfc2734_header
 
struct  fwnet_fragment_info
 
struct  fwnet_partial_datagram
 
struct  fwnet_device
 
struct  fwnet_peer
 
struct  fwnet_packet_task
 

Macros

#define FWNET_MAX_FRAGMENTS   30 /* arbitrary, > TX queue depth */
 
#define FWNET_ISO_PAGE_COUNT   (PAGE_SIZE < 16*1024 ? 4 : 2)
 
#define FWNET_MAX_QUEUED_DATAGRAMS   20 /* < 64 = number of tlabels */
 
#define FWNET_MIN_QUEUED_DATAGRAMS   10 /* should keep AT DMA busy enough */
 
#define FWNET_TX_QUEUE_LEN   FWNET_MAX_QUEUED_DATAGRAMS /* ? */
 
#define IEEE1394_BROADCAST_CHANNEL   31
 
#define IEEE1394_ALL_NODES   (0xffc0 | 0x003f)
 
#define IEEE1394_MAX_PAYLOAD_S100   512
 
#define FWNET_NO_FIFO_ADDR   (~0ULL)
 
#define IANA_SPECIFIER_ID   0x00005eU
 
#define RFC2734_SW_VERSION   0x000001U
 
#define IEEE1394_GASP_HDR_SIZE   8
 
#define RFC2374_UNFRAG_HDR_SIZE   4
 
#define RFC2374_FRAG_HDR_SIZE   8
 
#define RFC2374_FRAG_OVERHEAD   4
 
#define RFC2374_HDR_UNFRAG   0 /* unfragmented */
 
#define RFC2374_HDR_FIRSTFRAG   1 /* first fragment */
 
#define RFC2374_HDR_LASTFRAG   2 /* last fragment */
 
#define RFC2374_HDR_INTFRAG   3 /* interior fragment */
 
#define RFC2734_HW_ADDR_LEN   16
 
#define FWNET_ALEN   8
 
#define FWNET_HLEN   10
 
#define fwnet_get_hdr_lf(h)   (((h)->w0 & 0xc0000000) >> 30)
 
#define fwnet_get_hdr_ether_type(h)   (((h)->w0 & 0x0000ffff))
 
#define fwnet_get_hdr_dg_size(h)   (((h)->w0 & 0x0fff0000) >> 16)
 
#define fwnet_get_hdr_fg_off(h)   (((h)->w0 & 0x00000fff))
 
#define fwnet_get_hdr_dgl(h)   (((h)->w1 & 0xffff0000) >> 16)
 
#define fwnet_set_hdr_lf(lf)   ((lf) << 30)
 
#define fwnet_set_hdr_ether_type(et)   (et)
 
#define fwnet_set_hdr_dg_size(dgs)   ((dgs) << 16)
 
#define fwnet_set_hdr_fg_off(fgo)   (fgo)
 
#define fwnet_set_hdr_dgl(dgl)   ((dgl) << 16)
 

Functions

 module_init (fwnet_init)
 
 module_exit (fwnet_cleanup)
 
 MODULE_AUTHOR ("Jay Fenlason <[email protected]>")
 
 MODULE_DESCRIPTION ("IPv4 over IEEE1394 as per RFC 2734")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DEVICE_TABLE (ieee1394, fwnet_id_table)
 

Variables

struct rfc2734_arp __packed
 

Macro Definition Documentation

#define FWNET_ALEN   8

Definition at line 80 of file net.c.

#define fwnet_get_hdr_dg_size (   h)    (((h)->w0 & 0x0fff0000) >> 16)

Definition at line 95 of file net.c.

#define fwnet_get_hdr_dgl (   h)    (((h)->w1 & 0xffff0000) >> 16)

Definition at line 97 of file net.c.

#define fwnet_get_hdr_ether_type (   h)    (((h)->w0 & 0x0000ffff))

Definition at line 94 of file net.c.

#define fwnet_get_hdr_fg_off (   h)    (((h)->w0 & 0x00000fff))

Definition at line 96 of file net.c.

#define fwnet_get_hdr_lf (   h)    (((h)->w0 & 0xc0000000) >> 30)

Definition at line 93 of file net.c.

#define FWNET_HLEN   10

Definition at line 81 of file net.c.

#define FWNET_ISO_PAGE_COUNT   (PAGE_SIZE < 16*1024 ? 4 : 2)

Definition at line 34 of file net.c.

#define FWNET_MAX_FRAGMENTS   30 /* arbitrary, > TX queue depth */

Definition at line 33 of file net.c.

#define FWNET_MAX_QUEUED_DATAGRAMS   20 /* < 64 = number of tlabels */

Definition at line 37 of file net.c.

#define FWNET_MIN_QUEUED_DATAGRAMS   10 /* should keep AT DMA busy enough */

Definition at line 38 of file net.c.

#define FWNET_NO_FIFO_ADDR   (~0ULL)

Definition at line 44 of file net.c.

#define fwnet_set_hdr_dg_size (   dgs)    ((dgs) << 16)

Definition at line 101 of file net.c.

#define fwnet_set_hdr_dgl (   dgl)    ((dgl) << 16)

Definition at line 104 of file net.c.

#define fwnet_set_hdr_ether_type (   et)    (et)

Definition at line 100 of file net.c.

#define fwnet_set_hdr_fg_off (   fgo)    (fgo)

Definition at line 102 of file net.c.

#define fwnet_set_hdr_lf (   lf)    ((lf) << 30)

Definition at line 99 of file net.c.

#define FWNET_TX_QUEUE_LEN   FWNET_MAX_QUEUED_DATAGRAMS /* ? */

Definition at line 39 of file net.c.

#define IANA_SPECIFIER_ID   0x00005eU

Definition at line 46 of file net.c.

#define IEEE1394_ALL_NODES   (0xffc0 | 0x003f)

Definition at line 42 of file net.c.

#define IEEE1394_BROADCAST_CHANNEL   31

Definition at line 41 of file net.c.

#define IEEE1394_GASP_HDR_SIZE   8

Definition at line 49 of file net.c.

#define IEEE1394_MAX_PAYLOAD_S100   512

Definition at line 43 of file net.c.

#define RFC2374_FRAG_HDR_SIZE   8

Definition at line 52 of file net.c.

#define RFC2374_FRAG_OVERHEAD   4

Definition at line 53 of file net.c.

#define RFC2374_HDR_FIRSTFRAG   1 /* first fragment */

Definition at line 56 of file net.c.

#define RFC2374_HDR_INTFRAG   3 /* interior fragment */

Definition at line 58 of file net.c.

#define RFC2374_HDR_LASTFRAG   2 /* last fragment */

Definition at line 57 of file net.c.

#define RFC2374_HDR_UNFRAG   0 /* unfragmented */

Definition at line 55 of file net.c.

#define RFC2374_UNFRAG_HDR_SIZE   4

Definition at line 51 of file net.c.

#define RFC2734_HW_ADDR_LEN   16

Definition at line 60 of file net.c.

#define RFC2734_SW_VERSION   0x000001U

Definition at line 47 of file net.c.

Function Documentation

MODULE_AUTHOR ( "Jay Fenlason <[email protected]>"  )
MODULE_DESCRIPTION ( "IPv4 over IEEE1394 as per RFC 2734"  )
MODULE_DEVICE_TABLE ( ieee1394  ,
fwnet_id_table   
)
module_exit ( fwnet_cleanup  )
module_init ( fwnet_init  )
MODULE_LICENSE ( "GPL"  )

Variable Documentation