Linux kernel & device driver programming

Cross-Referenced Linux and Device Driver Code

[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ]
Version: [ 2.6.11.8 ] [ 2.6.25 ] [ 2.6.25.8 ] [ 2.6.31.13 ] Architecture: [ i386 ]
  1 
  2 /*
  3  * snull.h -- definitions for the network module
  4  *
  5  * Copyright (C) 2001 Alessandro Rubini and Jonathan Corbet
  6  * Copyright (C) 2001 O'Reilly & Associates
  7  *
  8  * The source code in this file can be freely used, adapted,
  9  * and redistributed in source or binary form, so long as an
 10  * acknowledgment appears in derived source files.  The citation
 11  * should list that the code comes from the book "Linux Device
 12  * Drivers" by Alessandro Rubini and Jonathan Corbet, published
 13  * by O'Reilly & Associates.   No warranty is attached;
 14  * we cannot take responsibility for errors or fitness for use.
 15  */
 16 
 17 /*
 18  * Macros to help debugging
 19  */
 20 
 21 #undef PDEBUG             /* undef it, just in case */
 22 #ifdef SNULL_DEBUG
 23 #  ifdef __KERNEL__
 24      /* This one if debugging is on, and kernel space */
 25 #    define PDEBUG(fmt, args...) printk( KERN_DEBUG "snull: " fmt, ## args)
 26 #  else
 27      /* This one for user space */
 28 #    define PDEBUG(fmt, args...) fprintf(stderr, fmt, ## args)
 29 #  endif
 30 #else
 31 #  define PDEBUG(fmt, args...) /* not debugging: nothing */
 32 #endif
 33 
 34 #undef PDEBUGG
 35 #define PDEBUGG(fmt, args...) /* nothing: it's a placeholder */
 36 
 37 
 38 /* These are the flags in the statusword */
 39 #define SNULL_RX_INTR 0x0001
 40 #define SNULL_TX_INTR 0x0002
 41 
 42 /* Default timeout period */
 43 #define SNULL_TIMEOUT 5   /* In jiffies */
 44 
 45 extern struct net_device *snull_devs[];
 46 
 47 
 48 
 49 
 50 
  This page was automatically generated by the LXR engine.