⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 if.4n

📁 早期freebsd实现
💻 4N
字号:
## 5799-WZQ (C) COPYRIGHT IBM CORPORATION 1988# LICENSED MATERIALS - PROPERTY OF IBM# REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083#.\"# $Header:if.4n_ca 1.5$ .\"# $ACIS:if.4n_ca 1.5$ .\"# $Source: /ibm/acis/usr/man/man4/RCS/if.4n_ca,v $ .\" @(#)if.4n	1.2 87/08/23 3.2/4.3NFSSRC.\" @(#)if.4n	1.2 87/02/10 NFSSRC.\" @(#)if.4n 1.1 86/09/25 SMI;.TH IF 4N "Sept 1988" "Space overwritten" " ".AC 1 0.SH NAMEif \- general properties of network interfaces (NFS only).SH DESCRIPTION.IX  "if device"  ""  "\fLif\fP \(em network interface general properties"  ""  PAGE STARTEach network interface in a system corresponds to apath through which messages may be sent and received.  A networkinterface usually has a hardware device associated with it, butcertain interfaces, such as the loopback interface.IR lo (4),do not..LPAt boot time each interface which has underlying hardware supportmakes itself known to the system during the autoconfigurationprocess.  Once the interface has acquired its address it isexpected to install a routing table entry so that messages maybe routed through it.  Most interfaces require some part oftheir address specified with an SIOCSIFADDR ioctl before theywill allow traffic to flow through them.  On interfaces wherethe network-link layer address mapping is static, only thenetwork number is taken from the ioctl; the remainder is foundin a hardware specific manner.  On interfaces which providedynamic network-link layer address mapping facilities (for example,10Mb/s Ethernets using.IR arp (4P),),the entire address specified in the ioctl is used..LPThe following .I ioctlcalls may be used to manipulate network interfaces.  Unlessspecified otherwise, the request takes an.I ifreqstructure as its parameter.  This structure has the form.RS.nfstruct	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 */};.fi.RE.IP SIOCSIFADDR 5.IX  "ioctls for sockets"  "SIOCSIFADDR"  "\fLioctl\fP's for sockets"  "\fLSIOCSIFADDR\fP \(em set ifnet address".IX  "SIOCSIFADDR set ifnet address"  ""  "\fLSIOCSIFADDR\fP \(em set ifnet address".IX  set "ifnet address ioctl \(em \fLSIOCSIFADDR\fP".IX  "network interface ioctls"  SIOCSIFADDR  "network interface \fLioctl\fP's" "\fLSIOCSIFADDR\fP \(em set ifnet address"Set interface address.  Following the addressassignment, the ``initialization'' routine forthe interface is called..IP SIOCGIFADDR.IX  "ioctls for sockets"  "SIOCGIFADDR"  "\fLioctl\fP's for sockets"  "\fLSIOCGIFADDR\fP \(em get ifnet address".IX  "SIOCGIFADDR get ifnet address"  ""  "\fLSIOCGIFADDR\fP \(em get ifnet address".IX  get "ifnet address \fLioctl\fP \(em \fLSIOCGIFADDR\fP".IX  "network interface ioctls"  SIOCGIFADDR  "network interface \fLioctl\fP's" "\fLSIOCGIFADDR\fP \(em get ifnet address"Get interface address..IP SIOCSIFDSTADDR.IX  "ioctls for sockets"  "SIOCSIFDSTADDR"  "\fLioctl\fP's for sockets"  "\fLSIOCSIFDSTADDR\fP \(em set p-p address".IX  "SIOCSIFDSTADDR set p-p address"  ""  "\fLSIOCSIFDSTADDR\fP \(em set p-p address".IX  set "p-p address ioctl \(em \fLSIOCSIFDSTADDR\fP".IX  "network interface ioctls"  SIOCSIFDSTADDR  "network interface \fLioctl\fP's" "\fLSIOCSIFDSTADDR\fP \(em set p-p address"Set point to point address for interface..IP SIOCGIFDSTADDR.IX  "ioctls for sockets"  "SIOCGIFDSTADDR"  "\fLioctl\fP's for sockets"  "\fLSIOCGIFDSTADDR\fP \(em get p-p address".IX  "SIOCGIFDSTADDR get p-p address"  ""  "\fLSIOCGIFDSTADDR\fP \(em get p-p address".IX  get "p-p address \fLioctl\fP \(em \fLSIOCGIFDSTADDR\fP".IX  "network interface ioctls"  SIOCGIFDSTADDR  "network interface \fLioctl\fP's" "\fLSIOCGIFDSTADDR\fP \(em get p-p address"Get point to point address for interface..IP SIOCSIFFLAGS.IX  "ioctls for sockets"  "SIOCSIFFLAGS"  "\fLioctl\fP's for sockets"  "\fLSIOCSIFFLAGS\fP \(em set ifnet flags".IX  "SIOCSIFFLAGS set ifnet flags"  ""  "\fLSIOCSIFFLAGS\fP \(em set ifnet flags".IX  set "ifnet flags ioctl \(em \fLSIOCSIFFLAGS\fP".IX  "network interface ioctls"  SIOCSIFFLAGS  "network interface \fLioctl\fP's" "\fLSIOCSIFFLAGS\fP \(em set ifnet flags"Set interface flags field.  If the interface is marked down,any processes currently routing packets through the interfaceare notified..IP SIOCGIFFLAGS.IX  "ioctls for sockets"  "SIOCGIFFLAGS"  "\fLioctl\fP's for sockets"  "\fLSIOCGIFFLAGS\fP \(em get ifnet flags".IX  "SIOCGIFFLAGS get ifnet flags"  ""  "\fLSIOCGIFFLAGS\fP \(em get ifnet flags".IX  get "ifnet flags \fLioctl\fP \(em \fLSIOCGIFFLAGS\fP".IX  "network interface ioctls"  SIOCGIFFLAGS  "network interface \fLioctl\fP's" "\fLSIOCGIFFLAGS\fP \(em get ifnet flags"Get interface flags..IP SIOCGIFCONF.IX  "ioctls for sockets"  "SIOCGIFCONF"  "\fLioctl\fP's for sockets"  "\fLSIOCGIFCONF\fP \(em get ifnet list".IX  "SIOCGIFCONF get ifnet list"  ""  "\fLSIOCGIFCONF\fP \(em get ifnet list".IX  get "ifnet list \fLioctl\fP \(em \fLSIOCGIFCONF\fP".IX  "network interface ioctls"  SIOCGIFCONF  "network interface \fLioctl\fP's" "\fLSIOCGIFCONF\fP \(em get ifnet list"Get interface configuration list.  This request takes an.I ifconfstructure (see below) as a value-result parameter.  The .I ifc_lenfield should be initially set to the size of the bufferpointed to by .IR ifc_buf .On return it will contain the length, in bytes, of theconfiguration list..RS.nf/* * 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 */};.RE.fi.IX  "if device"  ""  "\fLif\fP \(em network interface general properties"  ""  PAGE END.SH "SEE ALSOarp(4P), ec(4S), lo(4)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -