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/modules/netgraph/iface/ng_iface.4

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 .\" Copyright (c) 1996-1999 Whistle Communications, Inc.
    2 .\" All rights reserved.
    3 .\" 
    4 .\" Subject to the following obligations and disclaimer of warranty, use and
    5 .\" redistribution of this software, in source or object code forms, with or
    6 .\" without modifications are expressly permitted by Whistle Communications;
    7 .\" provided, however, that:
    8 .\" 1. Any and all reproductions of the source or object code must include the
    9 .\"    copyright notice above and the following disclaimer of warranties; and
   10 .\" 2. No rights are granted, in any manner or form, to use Whistle
   11 .\"    Communications, Inc. trademarks, including the mark "WHISTLE
   12 .\"    COMMUNICATIONS" on advertising, endorsements, or otherwise except as
   13 .\"    such appears in the above copyright notice or in the software.
   14 .\" 
   15 .\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
   16 .\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
   17 .\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
   18 .\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
   19 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
   20 .\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
   21 .\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
   22 .\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
   23 .\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
   24 .\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
   25 .\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
   26 .\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
   27 .\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
   28 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   29 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   30 .\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
   31 .\" OF SUCH DAMAGE.
   32 .\" 
   33 .\" Author: Archie Cobbs <archie@freebsd.org>
   34 .\"
   35 .\" $FreeBSD$
   36 .\" $Whistle: ng_iface.8,v 1.5 1999/01/25 23:46:26 archie Exp $
   37 .\"
   38 .Dd January 19, 1999
   39 .Dt NG_IFACE 4
   40 .Os FreeBSD
   41 .Sh NAME
   42 .Nm ng_iface
   43 .Nd interface netgraph node type
   44 .Sh SYNOPSIS
   45 .Fd #include <netgraph/ng_iface.h>
   46 .Sh DESCRIPTION
   47 An
   48 .Nm iface
   49 node is both a netgraph node and a system networking interface.  When an
   50 .Nm
   51 node is created, a new point-to-point interface appears which is accessible via
   52 .Xr ifconfig 8 .
   53 The new interfaces are named
   54 .Dv ng0 ,
   55 .Dv ng1 ,
   56 etc.  The node is assigned the same name as its interface, unless the name
   57 already exists, in which case the node remains unnamed.
   58 .Pp
   59 An
   60 .Nm
   61 node has a single hook corresponding to each supported protocol.
   62 Packets transmitted via the interface flow out the corresponding
   63 protocol-specific hook.
   64 Similarly, packets received on a hook appear on the interface as 
   65 packets received in the corresponding protocol.
   66 .Pp
   67 The currently supported protocols are IP, IPX, AppleTalk, and NS.
   68 In the KLD module, only support for IP is compiled in by default.
   69 .Pp
   70 An
   71 .Nm
   72 node supports the Berkeley Packet Filter (BPF). 
   73 .Sh HOOKS
   74 This node type supports the following hooks:
   75 .Pp
   76 .Bl -tag -width foobar
   77 .It Dv inet
   78 Transmission and reception of IP packets.
   79 .It Dv ipx
   80 Transmission and reception of IPX packets.
   81 .It Dv atalk
   82 Transmission and reception of AppleTalk packets.
   83 .It Dv ns
   84 Transmission and reception of NS packets.
   85 .El
   86 .Sh CONTROL MESSAGES
   87 This node type supports the generic control messages, plus the following:
   88 .Bl -tag -width foo
   89 .It Dv NGM_IFACE_GET_IFNAME
   90 Returns the name of the interface corresponding to this node in a
   91 .Dv "struct ng_iface_ifname" :
   92 .Bd -literal -offset 4n
   93 struct ng_iface_ifname {
   94   char  ngif_name[NG_IFACE_IFACE_NAME_MAX + 1];
   95 };
   96 .Ed
   97 .It Dv NGM_IFACE_GET_IFADDRS
   98 Returns the list of addresses associated with this interface.
   99 The list is returned in the same format as the
  100 .Dv SIOCGIFCONF
  101 .Fn ioctl .
  102 .It Dv NGM_CISCO_GET_IPADDR
  103 This message is defined by the
  104 .Xr ng_cisco 4
  105 node type; see
  106 .Xr ng_cisco 4
  107 for a description.
  108 .El
  109 .Sh SHUTDOWN
  110 Because it is currently not possible to remove a system networking
  111 interface in
  112 .Fx ,
  113 .Nm
  114 nodes are
  115 .Em persistent.
  116 That is, once created they are never destroyed.
  117 The receipt of a
  118 .Dv NGM_SHUTDOWN
  119 control message disconnects all hooks but does not remove the node.
  120 .Sh SEE ALSO
  121 .Xr bpf 4 ,
  122 .Xr netgraph 4 ,
  123 .Xr ng_cisco 4 ,
  124 .Xr ifconfig 8 ,
  125 .Xr ngctl 8
  126 .Sh HISTORY
  127 The
  128 .Nm
  129 node type was implemented in
  130 .Fx 4.0 .
  131 .Sh AUTHORS
  132 .An Archie Cobbs Aq archie@freebsd.org

Cache object: 8a9a8a4a152f0deed67818b44ea38338


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