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/device/net_io.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 /* 
    2  * Mach Operating System
    3  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
    4  * All Rights Reserved.
    5  * 
    6  * Permission to use, copy, modify and distribute this software and its
    7  * documentation is hereby granted, provided that both the copyright
    8  * notice and this permission notice appear in all copies of the
    9  * software, derivative works or modified versions, and any portions
   10  * thereof, and that both notices appear in supporting documentation.
   11  * 
   12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15  * 
   16  * Carnegie Mellon requests users of this software to return to
   17  * 
   18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19  *  School of Computer Science
   20  *  Carnegie Mellon University
   21  *  Pittsburgh PA 15213-3890
   22  * 
   23  * any improvements or extensions that they make and grant Carnegie Mellon
   24  * the rights to redistribute these changes.
   25  */
   26 /*
   27  * HISTORY
   28  * $Log:        net_io.h,v $
   29  * Revision 2.8  91/05/14  15:59:55  mrt
   30  *      Correcting copyright
   31  * 
   32  * Revision 2.7  91/03/16  14:43:26  rpd
   33  *      Added net_packet.
   34  *      [91/01/14            rpd]
   35  * 
   36  * Revision 2.6  91/02/05  17:10:03  mrt
   37  *      Changed to new Mach copyright
   38  *      [91/01/31  17:30:15  mrt]
   39  * 
   40  * Revision 2.5  91/01/08  15:09:56  rpd
   41  *      Replaced NET_KMSG_GET, NET_KMSG_FREE
   42  *      with net_kmsg_get, net_kmsg_put, net_kmsg_collect.
   43  *      [91/01/05            rpd]
   44  * 
   45  * Revision 2.4  90/06/02  14:48:20  rpd
   46  *      Converted to new IPC.
   47  *      [90/03/26  21:58:23  rpd]
   48  * 
   49  * Revision 2.3  90/02/22  20:02:26  dbg
   50  *      kmsg->queue_head becomds kmsg->chain.
   51  *      [90/01/25            dbg]
   52  * 
   53  * Revision 2.2  90/01/11  11:42:26  dbg
   54  *      Make run in parallel.
   55  *      [89/11/27            dbg]
   56  * 
   57  */
   58 /*
   59  *      Author: David B. Golub, Carnegie Mellon University
   60  *      Date:   ll/89
   61  */
   62 
   63 #ifndef _DEVICE_NET_IO_H_
   64 #define _DEVICE_NET_IO_H_
   65 
   66 /*
   67  * Utilities for playing with network messages.
   68  */
   69 
   70 #include <mach/machine/vm_types.h>
   71 #include <ipc/ipc_kmsg.h>
   72 
   73 #include <kern/macro_help.h>
   74 #include <kern/lock.h>
   75 #include <kern/kalloc.h>
   76 
   77 #include <device/net_status.h>
   78 
   79 /*
   80  * A network packet is wrapped in a kernel message while in
   81  * the kernel.
   82  */
   83 
   84 #define net_kmsg(kmsg)  ((net_rcv_msg_t)&(kmsg)->ikm_header)
   85 
   86 /*
   87  * Interrupt routines may allocate and free net_kmsgs with these
   88  * functions.  net_kmsg_get may return IKM_NULL.
   89  */
   90 
   91 extern ipc_kmsg_t net_kmsg_get();
   92 extern void net_kmsg_put();
   93 
   94 /*
   95  * Network utility routines.
   96  */
   97 
   98 extern void net_packet();
   99 extern void net_filter();
  100 extern io_return_t net_getstat();
  101 extern io_return_t net_write();
  102 
  103 /*
  104  * Non-interrupt code may allocate and free net_kmsgs with these functions.
  105  */
  106 
  107 extern vm_size_t net_kmsg_size;
  108 
  109 #define net_kmsg_alloc()        ((ipc_kmsg_t) kalloc(net_kmsg_size))
  110 #define net_kmsg_free(kmsg)     kfree((vm_offset_t) (kmsg), net_kmsg_size)
  111 
  112 #endif  _DEVICE_NET_IO_H_

Cache object: 99cc6a3c64c1ae9d33a330278005421d


[ 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.