The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/lib/libsa/netif.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: netif.h,v 1.5 2003/03/12 14:49:19 drochner Exp $       */
    2 
    3 #ifndef __SYS_LIBNETBOOT_NETIF_H
    4 #define __SYS_LIBNETBOOT_NETIF_H
    5 
    6 #include "iodesc.h"
    7 
    8 struct netif; /* forward */
    9 
   10 struct netif_driver {
   11         char    *netif_bname;
   12         int     (*netif_match) __P((struct netif *, void *));
   13         int     (*netif_probe) __P((struct netif *, void *));
   14         void    (*netif_init) __P((struct iodesc *, void *));
   15         int     (*netif_get) __P((struct iodesc *, void *, size_t, time_t));
   16         int     (*netif_put) __P((struct iodesc *, void *, size_t));
   17         void    (*netif_end) __P((struct netif *));
   18         struct  netif_dif *netif_ifs;
   19         int     netif_nifs;
   20 };
   21 
   22 struct netif_dif {
   23         int             dif_unit;
   24         int             dif_nsel;
   25         struct netif_stats *dif_stats;
   26         void            *dif_private;
   27         /* the following fields are used internally by the netif layer */
   28         u_long          dif_used;
   29 };
   30 
   31 struct netif_stats {
   32         int     collisions;
   33         int     collision_error;
   34         int     missed;
   35         int     sent;
   36         int     received;
   37         int     deferred;
   38         int     overflow;
   39 };
   40 
   41 struct netif {
   42         struct netif_driver     *nif_driver;
   43         int                     nif_unit;
   44         int                     nif_sel;
   45         void                    *nif_devdata;
   46 };
   47 
   48 extern struct netif_driver      *netif_drivers[];       /* machdep */
   49 extern int                      n_netif_drivers;
   50 
   51 extern int                      netif_debug;
   52 
   53 void            netif_init __P((void));
   54 struct netif    *netif_select __P((void *));
   55 int             netif_probe __P((struct netif *, void *));
   56 void            netif_attach __P((struct netif *, struct iodesc *, void *));
   57 void            netif_detach __P((struct netif *));
   58 
   59 int             netif_open __P((void *));
   60 int             netif_close __P((int));
   61 
   62 #endif /* __SYS_LIBNETBOOT_NETIF_H */

Cache object: 34b821bb2eeeadf025fdb4c3c789c473


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.