Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ if(7N) — sysv — mips UMIPS RISC/os 4.52

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

arp(7P)

lo(7)



IF(7N-SysV)         RISC/os Reference Manual          IF(7N-SysV)



NAME
     if - general properties of network interfaces

DESCRIPTION
     Each network interface in a system corresponds to a path
     through which messages may be sent and received.  A network
     interface usually has a hardware device associated with it,
     though certain interfaces such as the loopback interface,
     lo(7), do not.

     At boot time each interface which has underlying hardware
     support makes itself known to the system during the autocon-
     figuration process.  Once the interface has acquired its
     address it is expected to install a routing table entry so
     that messages may be routed through it.  Most interfaces
     require some part of their address specified with an SIOCSI-
     FADDR ioctl before they will allow traffic to flow through
     them.  On interfaces where the network-link layer address
     mapping is static, only the network number is taken from the
     ioctl; the remainder is found in a hardware specific manner.
     On interfaces which provide dynamic network-link layer
     address mapping facilities (for example, 10Mb/s Ethernets
     using arp(7P)), the entire address specified in the ioctl is
     used.

     The following ioctl calls may be used to manipulate network
     interfaces.  Unless specified otherwise, the request takes
     an ifreq structure as its parameter.  This structure has the
     form

     struct  ifreq {
        char  ifr_name[16];      /* name of interface (e.g. "ec0") */
        union {
           struct  sockaddr ifru_addr;
           struct  sockaddr ifru_dstaddr;
           short   ifru_flags;
        } ifr_ifru;
     #define  ifr_addr    ifr_ifru.ifru_addr    /* address */
     #define  ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
     #define  ifr_flags   ifr_ifru.ifru_flags   /* flags */
     };


     SIOCSIFADDR
          Set interface address.  Following the address assign-
          ment, the ``initialization'' routine for the interface
          is called.

     SIOCGIFADDR
          Get interface address.

     SIOCSIFDSTADDR



                         Printed 1/28/91                   Page 1





IF(7N-SysV)         RISC/os Reference Manual          IF(7N-SysV)



          Set point to point address for interface.

     SIOCGIFDSTADDR
          Get point to point address for interface.

     SIOCSIFFLAGS
          Set interface flags field.  If the interface is marked
          down, any processes currently routing packets through
          the interface are notified.

     SIOCGIFFLAGS
          Get interface flags.

     SIOCGIFCONF
          Get interface configuration list.  This request takes
          an ifconf structure (see below) as a value-result
          parameter.  The ifc_len field should be initially set
          to the size of the buffer pointed to by ifc_buf.  On
          return it will contain the length, in bytes, of the
          configuration list.

     /*
      * Structure used in SIOCGIFCONF request.
      * Used to retrieve interface configuration
      * for machine (useful for programs which
      * must know all networks accessible).
      */
     struct  ifconf {
       int   ifc_len;      /* size of associated buffer */
       union {
         caddr_t  ifcu_buf;
         struct   ifreq *ifcu_req;
       } ifc_ifcu;
     #define  ifc_buf  ifc_ifcu.ifcu_buf  /* buffer address */
     #define  ifc_req  ifc_ifcu.ifcu_req  /* array of structures returned */
     };


SEE ALSO
     arp(7P), lo(7)















 Page 2                  Printed 1/28/91



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026