Full switch to clang/ELF. Drop ack. Simplify.
There is important information about booting non-ack images in docs/UPDATING. ack/aout-format images can't be built any more, and booting clang/ELF-format ones is a little different. Updating to the new boot monitor is recommended. Changes in this commit: . drop boot monitor -> allowing dropping ack support . facility to copy ELF boot files to /boot so that old boot monitor can still boot fairly easily, see UPDATING . no more ack-format libraries -> single-case libraries . some cleanup of OBJECT_FMT, COMPILER_TYPE, etc cases . drop several ack toolchain commands, but not all support commands (e.g. aal is gone but acksize is not yet). . a few libc files moved to netbsd libc dir . new /bin/date as minix date used code in libc/ . test compile fix . harmonize includes . /usr/lib is no longer special: without ack, /usr/lib plays no kind of special bootstrapping role any more and bootstrapping is done exclusively through packages, so releases depend even less on the state of the machine making them now. . rename nbsd_lib* to lib* . reduce mtree
This commit is contained in:
5
include/net/Makefile
Normal file
5
include/net/Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
INCSDIR= /usr/include/net
|
||||
|
||||
INCS+= hton.h ethertypes.h if.h if_ether.h netlib.h
|
||||
|
||||
.include <bsd.kinc.mk>
|
||||
313
include/net/ethertypes.h
Normal file
313
include/net/ethertypes.h
Normal file
@@ -0,0 +1,313 @@
|
||||
/* $NetBSD: ethertypes.h,v 1.17 2005/12/10 23:21:38 elad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)if_ether.h 8.1 (Berkeley) 6/10/93
|
||||
*/
|
||||
|
||||
/*
|
||||
* Ethernet protocol types.
|
||||
*
|
||||
* According to "assigned numbers", the Ethernet protocol numbers are also
|
||||
* used as ARP protocol type numbers.
|
||||
*
|
||||
* I factor them out here to avoid pulling all the Ethernet header file
|
||||
* into the hardware independent ARP code. -is
|
||||
*
|
||||
* Additional sources of information:
|
||||
* http://www.mit.edu/~map/Ethernet/Ethernet.txt
|
||||
* ftp://venera.isi.edu/in-notes/iana/assignments/ethernet-numbers
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NET_ETHERTYPES_H_
|
||||
#define _NET_ETHERTYPES_H_
|
||||
|
||||
/*
|
||||
* NOTE: 0x0000-0x05DC (0..1500) are generally IEEE 802.3 length fields.
|
||||
* However, there are some conflicts.
|
||||
*/
|
||||
|
||||
#define ETHERTYPE_8023 0x0004 /* IEEE 802.3 packet */
|
||||
/* 0x0101 .. 0x1FF Experimental */
|
||||
#define ETHERTYPE_PUP 0x0200 /* Xerox PUP protocol - see 0A00 */
|
||||
#define ETHERTYPE_PUPAT 0x0200 /* PUP Address Translation - see 0A01 */
|
||||
#define ETHERTYPE_SPRITE 0x0500 /* ??? */
|
||||
/* 0x0400 Nixdorf */
|
||||
#define ETHERTYPE_NS 0x0600 /* XNS */
|
||||
#define ETHERTYPE_NSAT 0x0601 /* XNS Address Translation (3Mb only) */
|
||||
#define ETHERTYPE_DLOG1 0x0660 /* DLOG (?) */
|
||||
#define ETHERTYPE_DLOG2 0x0661 /* DLOG (?) */
|
||||
#define ETHERTYPE_IP 0x0800 /* IP protocol */
|
||||
#define ETHERTYPE_X75 0x0801 /* X.75 Internet */
|
||||
#define ETHERTYPE_NBS 0x0802 /* NBS Internet */
|
||||
#define ETHERTYPE_ECMA 0x0803 /* ECMA Internet */
|
||||
#define ETHERTYPE_CHAOS 0x0804 /* CHAOSnet */
|
||||
#define ETHERTYPE_X25 0x0805 /* X.25 Level 3 */
|
||||
#define ETHERTYPE_ARP 0x0806 /* Address resolution protocol */
|
||||
#define ETHERTYPE_NSCOMPAT 0x0807 /* XNS Compatibility */
|
||||
#define ETHERTYPE_FRARP 0x0808 /* Frame Relay ARP (RFC1701) */
|
||||
/* 0x081C Symbolics Private */
|
||||
/* 0x0888 - 0x088A Xyplex */
|
||||
#define ETHERTYPE_UBDEBUG 0x0900 /* Ungermann-Bass network debugger */
|
||||
#define ETHERTYPE_IEEEPUP 0x0A00 /* Xerox IEEE802.3 PUP */
|
||||
#define ETHERTYPE_IEEEPUPAT 0x0A01 /* Xerox IEEE802.3 PUP Address Translation */
|
||||
#define ETHERTYPE_VINES 0x0BAD /* Banyan VINES */
|
||||
#define ETHERTYPE_VINESLOOP 0x0BAE /* Banyan VINES Loopback */
|
||||
#define ETHERTYPE_VINESECHO 0x0BAF /* Banyan VINES Echo */
|
||||
|
||||
/* 0x1000 - 0x100F Berkeley Trailer */
|
||||
/*
|
||||
* The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
|
||||
* (type-ETHERTYPE_TRAIL)*512 bytes of data followed
|
||||
* by an ETHER type (as given above) and then the (variable-length) header.
|
||||
*/
|
||||
#define ETHERTYPE_TRAIL 0x1000 /* Trailer packet */
|
||||
#define ETHERTYPE_NTRAILER 16
|
||||
|
||||
#define ETHERTYPE_DCA 0x1234 /* DCA - Multicast */
|
||||
#define ETHERTYPE_VALID 0x1600 /* VALID system protocol */
|
||||
#define ETHERTYPE_DOGFIGHT 0x1989 /* Artificial Horizons ("Aviator" dogfight simulator [on Sun]) */
|
||||
#define ETHERTYPE_RCL 0x1995 /* Datapoint Corporation (RCL lan protocol) */
|
||||
|
||||
/* The following 3C0x types
|
||||
are unregistered: */
|
||||
#define ETHERTYPE_NBPVCD 0x3C00 /* 3Com NBP virtual circuit datagram (like XNS SPP) not registered */
|
||||
#define ETHERTYPE_NBPSCD 0x3C01 /* 3Com NBP System control datagram not registered */
|
||||
#define ETHERTYPE_NBPCREQ 0x3C02 /* 3Com NBP Connect request (virtual cct) not registered */
|
||||
#define ETHERTYPE_NBPCRSP 0x3C03 /* 3Com NBP Connect repsonse not registered */
|
||||
#define ETHERTYPE_NBPCC 0x3C04 /* 3Com NBP Connect complete not registered */
|
||||
#define ETHERTYPE_NBPCLREQ 0x3C05 /* 3Com NBP Close request (virtual cct) not registered */
|
||||
#define ETHERTYPE_NBPCLRSP 0x3C06 /* 3Com NBP Close response not registered */
|
||||
#define ETHERTYPE_NBPDG 0x3C07 /* 3Com NBP Datagram (like XNS IDP) not registered */
|
||||
#define ETHERTYPE_NBPDGB 0x3C08 /* 3Com NBP Datagram broadcast not registered */
|
||||
#define ETHERTYPE_NBPCLAIM 0x3C09 /* 3Com NBP Claim NetBIOS name not registered */
|
||||
#define ETHERTYPE_NBPDLTE 0x3C0A /* 3Com NBP Delete Netbios name not registered */
|
||||
#define ETHERTYPE_NBPRAS 0x3C0B /* 3Com NBP Remote adaptor status request not registered */
|
||||
#define ETHERTYPE_NBPRAR 0x3C0C /* 3Com NBP Remote adaptor response not registered */
|
||||
#define ETHERTYPE_NBPRST 0x3C0D /* 3Com NBP Reset not registered */
|
||||
|
||||
#define ETHERTYPE_PCS 0x4242 /* PCS Basic Block Protocol */
|
||||
#define ETHERTYPE_IMLBLDIAG 0x424C /* Information Modes Little Big LAN diagnostic */
|
||||
#define ETHERTYPE_DIDDLE 0x4321 /* THD - Diddle */
|
||||
#define ETHERTYPE_IMLBL 0x4C42 /* Information Modes Little Big LAN */
|
||||
#define ETHERTYPE_SIMNET 0x5208 /* BBN Simnet Private */
|
||||
#define ETHERTYPE_DECEXPER 0x6000 /* DEC Unassigned, experimental */
|
||||
#define ETHERTYPE_MOPDL 0x6001 /* DEC MOP dump/load */
|
||||
#define ETHERTYPE_MOPRC 0x6002 /* DEC MOP remote console */
|
||||
#define ETHERTYPE_DECnet 0x6003 /* DEC DECNET Phase IV route */
|
||||
#define ETHERTYPE_DN ETHERTYPE_DECnet /* libpcap, tcpdump */
|
||||
#define ETHERTYPE_LAT 0x6004 /* DEC LAT */
|
||||
#define ETHERTYPE_DECDIAG 0x6005 /* DEC diagnostic protocol (at interface initialization?) */
|
||||
#define ETHERTYPE_DECCUST 0x6006 /* DEC customer protocol */
|
||||
#define ETHERTYPE_SCA 0x6007 /* DEC LAVC, SCA */
|
||||
#define ETHERTYPE_AMBER 0x6008 /* DEC AMBER */
|
||||
#define ETHERTYPE_DECMUMPS 0x6009 /* DEC MUMPS */
|
||||
/* 0x6010 - 0x6014 3Com Corporation */
|
||||
#define ETHERTYPE_TRANSETHER 0x6558 /* Trans Ether Bridging (RFC1701)*/
|
||||
#define ETHERTYPE_RAWFR 0x6559 /* Raw Frame Relay (RFC1701) */
|
||||
#define ETHERTYPE_UBDL 0x7000 /* Ungermann-Bass download */
|
||||
#define ETHERTYPE_UBNIU 0x7001 /* Ungermann-Bass NIUs */
|
||||
#define ETHERTYPE_UBDIAGLOOP 0x7002 /* Ungermann-Bass diagnostic/loopback */
|
||||
#define ETHERTYPE_UBNMC 0x7003 /* Ungermann-Bass ??? (NMC to/from UB Bridge) */
|
||||
#define ETHERTYPE_UBBST 0x7005 /* Ungermann-Bass Bridge Spanning Tree */
|
||||
#define ETHERTYPE_OS9 0x7007 /* OS/9 Microware */
|
||||
#define ETHERTYPE_OS9NET 0x7009 /* OS/9 Net? */
|
||||
/* 0x7020 - 0x7029 LRT (England) (now Sintrom) */
|
||||
#define ETHERTYPE_RACAL 0x7030 /* Racal-Interlan */
|
||||
#define ETHERTYPE_PRIMENTS 0x7031 /* Prime NTS (Network Terminal Service) */
|
||||
#define ETHERTYPE_CABLETRON 0x7034 /* Cabletron */
|
||||
#define ETHERTYPE_CRONUSVLN 0x8003 /* Cronus VLN */
|
||||
#define ETHERTYPE_CRONUS 0x8004 /* Cronus Direct */
|
||||
#define ETHERTYPE_HP 0x8005 /* HP Probe */
|
||||
#define ETHERTYPE_NESTAR 0x8006 /* Nestar */
|
||||
#define ETHERTYPE_ATTSTANFORD 0x8008 /* AT&T/Stanford (local use) */
|
||||
#define ETHERTYPE_EXCELAN 0x8010 /* Excelan */
|
||||
#define ETHERTYPE_SG_DIAG 0x8013 /* SGI diagnostic type */
|
||||
#define ETHERTYPE_SG_NETGAMES 0x8014 /* SGI network games */
|
||||
#define ETHERTYPE_SG_RESV 0x8015 /* SGI reserved type */
|
||||
#define ETHERTYPE_SG_BOUNCE 0x8016 /* SGI bounce server */
|
||||
#define ETHERTYPE_APOLLODOMAIN 0x8019 /* Apollo DOMAIN */
|
||||
#define ETHERTYPE_TYMSHARE 0x802E /* Tymeshare */
|
||||
#define ETHERTYPE_TIGAN 0x802F /* Tigan, Inc. */
|
||||
#define ETHERTYPE_REVARP 0x8035 /* Reverse addr resolution protocol */
|
||||
#define ETHERTYPE_AEONIC 0x8036 /* Aeonic Systems */
|
||||
#define ETHERTYPE_IPXNEW 0x8037 /* IPX (Novell Netware?) */
|
||||
#define ETHERTYPE_LANBRIDGE 0x8038 /* DEC LANBridge */
|
||||
#define ETHERTYPE_DSMD 0x8039 /* DEC DSM/DDP */
|
||||
#define ETHERTYPE_ARGONAUT 0x803A /* DEC Argonaut Console */
|
||||
#define ETHERTYPE_VAXELN 0x803B /* DEC VAXELN */
|
||||
#define ETHERTYPE_DECDNS 0x803C /* DEC DNS Naming Service */
|
||||
#define ETHERTYPE_ENCRYPT 0x803D /* DEC Ethernet Encryption */
|
||||
#define ETHERTYPE_DECDTS 0x803E /* DEC Distributed Time Service */
|
||||
#define ETHERTYPE_DECLTM 0x803F /* DEC LAN Traffic Monitor */
|
||||
#define ETHERTYPE_DECNETBIOS 0x8040 /* DEC PATHWORKS DECnet NETBIOS Emulation */
|
||||
#define ETHERTYPE_DECLAST 0x8041 /* DEC Local Area System Transport */
|
||||
/* 0x8042 DEC Unassigned */
|
||||
#define ETHERTYPE_PLANNING 0x8044 /* Planning Research Corp. */
|
||||
/* 0x8046 - 0x8047 AT&T */
|
||||
#define ETHERTYPE_DECAM 0x8048 /* DEC Availability Manager for Distributed Systems DECamds (but someone at DEC says not) */
|
||||
#define ETHERTYPE_EXPERDATA 0x8049 /* ExperData */
|
||||
#define ETHERTYPE_VEXP 0x805B /* Stanford V Kernel exp. */
|
||||
#define ETHERTYPE_VPROD 0x805C /* Stanford V Kernel prod. */
|
||||
#define ETHERTYPE_ES 0x805D /* Evans & Sutherland */
|
||||
#define ETHERTYPE_LITTLE 0x8060 /* Little Machines */
|
||||
#define ETHERTYPE_COUNTERPOINT 0x8062 /* Counterpoint Computers */
|
||||
/* 0x8065 - 0x8066 Univ. of Mass @ Amherst */
|
||||
#define ETHERTYPE_VEECO 0x8067 /* Veeco Integrated Auto. */
|
||||
#define ETHERTYPE_GENDYN 0x8068 /* General Dynamics */
|
||||
#define ETHERTYPE_ATT 0x8069 /* AT&T */
|
||||
#define ETHERTYPE_AUTOPHON 0x806A /* Autophon */
|
||||
#define ETHERTYPE_COMDESIGN 0x806C /* ComDesign */
|
||||
#define ETHERTYPE_COMPUGRAPHIC 0x806D /* Compugraphic Corporation */
|
||||
/* 0x806E - 0x8077 Landmark Graphics Corp. */
|
||||
#define ETHERTYPE_MATRA 0x807A /* Matra */
|
||||
#define ETHERTYPE_DDE 0x807B /* Dansk Data Elektronik */
|
||||
#define ETHERTYPE_MERIT 0x807C /* Merit Internodal (or Univ of Michigan?) */
|
||||
/* 0x807D - 0x807F Vitalink Communications */
|
||||
#define ETHERTYPE_VLTLMAN 0x8080 /* Vitalink TransLAN III Management */
|
||||
/* 0x8081 - 0x8083 Counterpoint Computers */
|
||||
/* 0x8088 - 0x808A Xyplex */
|
||||
#define ETHERTYPE_ATALK 0x809B /* AppleTalk */
|
||||
#define ETHERTYPE_AT ETHERTYPE_ATALK /* old NetBSD */
|
||||
#define ETHERTYPE_APPLETALK ETHERTYPE_ATALK /* HP-UX */
|
||||
/* 0x809C - 0x809E Datability */
|
||||
#define ETHERTYPE_SPIDER 0x809F /* Spider Systems Ltd. */
|
||||
/* 0x80A3 Nixdorf */
|
||||
/* 0x80A4 - 0x80B3 Siemens Gammasonics Inc. */
|
||||
/* 0x80C0 - 0x80C3 DCA (Digital Comm. Assoc.) Data Exchange Cluster */
|
||||
/* 0x80C4 - 0x80C5 Banyan Systems */
|
||||
#define ETHERTYPE_PACER 0x80C6 /* Pacer Software */
|
||||
#define ETHERTYPE_APPLITEK 0x80C7 /* Applitek Corporation */
|
||||
/* 0x80C8 - 0x80CC Intergraph Corporation */
|
||||
/* 0x80CD - 0x80CE Harris Corporation */
|
||||
/* 0x80CF - 0x80D2 Taylor Instrument */
|
||||
/* 0x80D3 - 0x80D4 Rosemount Corporation */
|
||||
#define ETHERTYPE_SNA 0x80D5 /* IBM SNA Services over Ethernet */
|
||||
#define ETHERTYPE_VARIAN 0x80DD /* Varian Associates */
|
||||
/* 0x80DE - 0x80DF TRFS (Integrated Solutions Transparent Remote File System) */
|
||||
/* 0x80E0 - 0x80E3 Allen-Bradley */
|
||||
/* 0x80E4 - 0x80F0 Datability */
|
||||
#define ETHERTYPE_RETIX 0x80F2 /* Retix */
|
||||
#define ETHERTYPE_AARP 0x80F3 /* AppleTalk AARP */
|
||||
/* 0x80F4 - 0x80F5 Kinetics */
|
||||
#define ETHERTYPE_APOLLO 0x80F7 /* Apollo Computer */
|
||||
#define ETHERTYPE_VLAN 0x8100 /* IEEE 802.1Q VLAN tagging (XXX conflicts) */
|
||||
/* 0x80FF - 0x8101 Wellfleet Communications (XXX conflicts) */
|
||||
#define ETHERTYPE_BOFL 0x8102 /* Wellfleet; BOFL (Breath OF Life) pkts [every 5-10 secs.] */
|
||||
#define ETHERTYPE_WELLFLEET 0x8103 /* Wellfleet Communications */
|
||||
/* 0x8107 - 0x8109 Symbolics Private */
|
||||
#define ETHERTYPE_TALARIS 0x812B /* Talaris */
|
||||
#define ETHERTYPE_WATERLOO 0x8130 /* Waterloo Microsystems Inc. (XXX which?) */
|
||||
#define ETHERTYPE_HAYES 0x8130 /* Hayes Microcomputers (XXX which?) */
|
||||
#define ETHERTYPE_VGLAB 0x8131 /* VG Laboratory Systems */
|
||||
/* 0x8132 - 0x8137 Bridge Communications */
|
||||
#define ETHERTYPE_IPX 0x8137 /* Novell (old) NetWare IPX (ECONFIG E option) */
|
||||
#define ETHERTYPE_NOVELL 0x8138 /* Novell, Inc. */
|
||||
/* 0x8139 - 0x813D KTI */
|
||||
#define ETHERTYPE_MUMPS 0x813F /* M/MUMPS data sharing */
|
||||
#define ETHERTYPE_AMOEBA 0x8145 /* Vrije Universiteit (NL) Amoeba 4 RPC (obsolete) */
|
||||
#define ETHERTYPE_FLIP 0x8146 /* Vrije Universiteit (NL) FLIP (Fast Local Internet Protocol) */
|
||||
#define ETHERTYPE_VURESERVED 0x8147 /* Vrije Universiteit (NL) [reserved] */
|
||||
#define ETHERTYPE_LOGICRAFT 0x8148 /* Logicraft */
|
||||
#define ETHERTYPE_NCD 0x8149 /* Network Computing Devices */
|
||||
#define ETHERTYPE_ALPHA 0x814A /* Alpha Micro */
|
||||
#define ETHERTYPE_SNMP 0x814C /* SNMP over Ethernet (see RFC1089) */
|
||||
/* 0x814D - 0x814E BIIN */
|
||||
#define ETHERTYPE_TEC 0x814F /* Technically Elite Concepts */
|
||||
#define ETHERTYPE_RATIONAL 0x8150 /* Rational Corp */
|
||||
/* 0x8151 - 0x8153 Qualcomm */
|
||||
/* 0x815C - 0x815E Computer Protocol Pty Ltd */
|
||||
/* 0x8164 - 0x8166 Charles River Data Systems */
|
||||
#define ETHERTYPE_XTP 0x817D /* Protocol Engines XTP */
|
||||
#define ETHERTYPE_SGITW 0x817E /* SGI/Time Warner prop. */
|
||||
#define ETHERTYPE_HIPPI_FP 0x8180 /* HIPPI-FP encapsulation */
|
||||
#define ETHERTYPE_STP 0x8181 /* Scheduled Transfer STP, HIPPI-ST */
|
||||
/* 0x8182 - 0x8183 Reserved for HIPPI-6400 */
|
||||
/* 0x8184 - 0x818C SGI prop. */
|
||||
#define ETHERTYPE_MOTOROLA 0x818D /* Motorola */
|
||||
#define ETHERTYPE_NETBEUI 0x8191 /* PowerLAN NetBIOS/NetBEUI (PC) */
|
||||
/* 0x819A - 0x81A3 RAD Network Devices */
|
||||
/* 0x81B7 - 0x81B9 Xyplex */
|
||||
/* 0x81CC - 0x81D5 Apricot Computers */
|
||||
/* 0x81D6 - 0x81DD Artisoft Lantastic */
|
||||
/* 0x81E6 - 0x81EF Polygon */
|
||||
/* 0x81F0 - 0x81F2 Comsat Labs */
|
||||
/* 0x81F3 - 0x81F5 SAIC */
|
||||
/* 0x81F6 - 0x81F8 VG Analytical */
|
||||
/* 0x8203 - 0x8205 QNX Software Systems Ltd. */
|
||||
/* 0x8221 - 0x8222 Ascom Banking Systems */
|
||||
/* 0x823E - 0x8240 Advanced Encryption Systems */
|
||||
/* 0x8263 - 0x826A Charles River Data Systems */
|
||||
/* 0x827F - 0x8282 Athena Programming */
|
||||
/* 0x829A - 0x829B Inst Ind Info Tech */
|
||||
/* 0x829C - 0x82AB Taurus Controls */
|
||||
/* 0x82AC - 0x8693 Walker Richer & Quinn */
|
||||
#define ETHERTYPE_ACCTON 0x8390 /* Accton Technologies (unregistered) */
|
||||
#define ETHERTYPE_TALARISMC 0x852B /* Talaris multicast */
|
||||
#define ETHERTYPE_KALPANA 0x8582 /* Kalpana */
|
||||
/* 0x8694 - 0x869D Idea Courier */
|
||||
/* 0x869E - 0x86A1 Computer Network Tech */
|
||||
/* 0x86A3 - 0x86AC Gateway Communications */
|
||||
#define ETHERTYPE_SECTRA 0x86DB /* SECTRA */
|
||||
#define ETHERTYPE_IPV6 0x86DD /* IP protocol version 6 */
|
||||
#define ETHERTYPE_DELTACON 0x86DE /* Delta Controls */
|
||||
#define ETHERTYPE_ATOMIC 0x86DF /* ATOMIC */
|
||||
/* 0x86E0 - 0x86EF Landis & Gyr Powers */
|
||||
/* 0x8700 - 0x8710 Motorola */
|
||||
#define ETHERTYPE_RDP 0x8739 /* Control Technology Inc. RDP Without IP */
|
||||
#define ETHERTYPE_MICP 0x873A /* Control Technology Inc. Mcast Industrial Ctrl Proto. */
|
||||
/* 0x873B - 0x873C Control Technology Inc. Proprietary */
|
||||
#define ETHERTYPE_TCPCOMP 0x876B /* TCP/IP Compression (RFC1701) */
|
||||
#define ETHERTYPE_IPAS 0x876C /* IP Autonomous Systems (RFC1701) */
|
||||
#define ETHERTYPE_SECUREDATA 0x876D /* Secure Data (RFC1701) */
|
||||
#define ETHERTYPE_FLOWCONTROL 0x8808 /* 802.3x flow control packet */
|
||||
#define ETHERTYPE_SLOWPROTOCOLS 0x8809 /* Slow protocols */
|
||||
#define ETHERTYPE_PPP 0x880B /* PPP (obsolete by PPPOE) */
|
||||
#define ETHERTYPE_HITACHI 0x8820 /* Hitachi Cable (Optoelectronic Systems Laboratory) */
|
||||
#define ETHERTYPE_MPLS 0x8847 /* MPLS Unicast */
|
||||
#define ETHERTYPE_MPLS_MCAST 0x8848 /* MPLS Multicast */
|
||||
#define ETHERTYPE_AXIS 0x8856 /* Axis Communications AB proprietary bootstrap/config */
|
||||
#define ETHERTYPE_PPPOEDISC 0x8863 /* PPP Over Ethernet Discovery Stage */
|
||||
#define ETHERTYPE_PPPOE 0x8864 /* PPP Over Ethernet Session Stage */
|
||||
#define ETHERTYPE_LANPROBE 0x8888 /* HP LanProbe test? */
|
||||
#define ETHERTYPE_PAE 0x888e /* EAPOL PAE/802.1x */
|
||||
#define ETHERTYPE_LOOPBACK 0x9000 /* Loopback */
|
||||
#define ETHERTYPE_LBACK ETHERTYPE_LOOPBACK /* DEC MOP loopback */
|
||||
#define ETHERTYPE_XNSSM 0x9001 /* 3Com (Formerly Bridge Communications), XNS Systems Management */
|
||||
#define ETHERTYPE_TCPSM 0x9002 /* 3Com (Formerly Bridge Communications), TCP/IP Systems Management */
|
||||
#define ETHERTYPE_BCLOOP 0x9003 /* 3Com (Formerly Bridge Communications), loopback detection */
|
||||
#define ETHERTYPE_DEBNI 0xAAAA /* DECNET? Used by VAX 6220 DEBNI */
|
||||
#define ETHERTYPE_SONIX 0xFAF5 /* Sonix Arpeggio */
|
||||
#define ETHERTYPE_VITAL 0xFF00 /* BBN VITAL-LanBridge cache wakeups */
|
||||
/* 0xFF00 - 0xFFOF ISC Bunker Ramo */
|
||||
|
||||
#define ETHERTYPE_MAX 0xFFFF /* Maximum valid ethernet type, reserved */
|
||||
|
||||
#endif /* !_NET_ETHERTYPES_H_ */
|
||||
23
include/net/gen/arp_io.h
Normal file
23
include/net/gen/arp_io.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
net/gen/arp_io.h
|
||||
|
||||
Created: Jan 2001 by Philip Homburg <philip@f-mnx.phicoh.com>
|
||||
*/
|
||||
|
||||
typedef struct nwio_arp
|
||||
{
|
||||
int nwa_entno;
|
||||
u32_t nwa_flags;
|
||||
ipaddr_t nwa_ipaddr;
|
||||
ether_addr_t nwa_ethaddr;
|
||||
} nwio_arp_t;
|
||||
|
||||
#define NWAF_EMPTY 0
|
||||
#define NWAF_INCOMPLETE 1
|
||||
#define NWAF_DEAD 2
|
||||
#define NWAF_PERM 4
|
||||
#define NWAF_PUB 8
|
||||
|
||||
/*
|
||||
* $PchId: arp_io.h,v 1.2 2004/08/03 11:01:59 philip Exp $
|
||||
*/
|
||||
77
include/net/gen/dhcp.h
Normal file
77
include/net/gen/dhcp.h
Normal file
@@ -0,0 +1,77 @@
|
||||
/* net/gen/dhcp.h - DHCP packet format Author: Kees J. Bot
|
||||
* 1 Dec 2000
|
||||
*/
|
||||
|
||||
#ifndef __NET__GEN__DHCP_H__
|
||||
#define __NET__GEN__DHCP_H__
|
||||
|
||||
typedef struct dhcp {
|
||||
u8_t op; /* Message opcode/type. */
|
||||
u8_t htype; /* Hardware address type. */
|
||||
u8_t hlen; /* Hardware address length. */
|
||||
u8_t hops; /* Hop count when relaying. */
|
||||
u32_t xid; /* Transaction ID. */
|
||||
u16_t secs; /* Seconds past since client began. */
|
||||
u16_t flags; /* Flags. */
|
||||
ipaddr_t ciaddr; /* Client IP address. */
|
||||
ipaddr_t yiaddr; /* "Your" IP address. */
|
||||
ipaddr_t siaddr; /* Boot server IP address. */
|
||||
ipaddr_t giaddr; /* Relay agent (gateway) IP address. */
|
||||
u8_t chaddr[16]; /* Client hardware address. */
|
||||
u8_t sname[64]; /* Server host name. */
|
||||
u8_t file[128]; /* Boot file. */
|
||||
u32_t magic; /* Magic number. */
|
||||
u8_t options[308]; /* Optional parameters. */
|
||||
} dhcp_t;
|
||||
|
||||
/* DHCP operations and stuff: */
|
||||
#define DHCP_BOOTREQUEST 1 /* Boot request message. */
|
||||
#define DHCP_BOOTREPLY 2 /* Boot reply message. */
|
||||
#define DHCP_HTYPE_ETH 1 /* Ethernet hardware type. */
|
||||
#define DHCP_HLEN_ETH 6 /* Ethernet hardware address length. */
|
||||
#define DHCP_FLAGS_BCAST 0x8000U /* Reply must be broadcast to client. */
|
||||
|
||||
/* "Magic" first four option bytes. */
|
||||
#ifdef __NBSD_LIBC
|
||||
#define DHCP_MAGIC htonl(0x63825363UL)
|
||||
#else
|
||||
#define DHCP_MAGIC HTONL(0x63825363UL)
|
||||
#endif
|
||||
|
||||
/* DHCP common tags: */
|
||||
#define DHCP_TAG_NETMASK 1 /* Netmask. */
|
||||
#define DHCP_TAG_GATEWAY 3 /* Gateway list. */
|
||||
#define DHCP_TAG_DNS 6 /* DNS Nameserver list. */
|
||||
#define DHCP_TAG_HOSTNAME 12 /* Host name. */
|
||||
#define DHCP_TAG_DOMAIN 15 /* Domain. */
|
||||
#define DHCP_TAG_IPMTU 26 /* Interface MTU. */
|
||||
|
||||
/* DHCP protocol tags: */
|
||||
#define DHCP_TAG_REQIP 50 /* Request this IP. */
|
||||
#define DHCP_TAG_LEASE 51 /* Lease time requested/offered. */
|
||||
#define DHCP_TAG_OVERLOAD 52 /* Options continued in file/sname. */
|
||||
#define DHCP_TAG_TYPE 53 /* DHCP message (values below). */
|
||||
#define DHCP_TAG_SERVERID 54 /* Server identifier. */
|
||||
#define DHCP_TAG_REQPAR 55 /* Parameters requested. */
|
||||
#define DHCP_TAG_MESSAGE 56 /* Error message. */
|
||||
#define DHCP_TAG_MAXDHCP 57 /* Max DHCP packet size. */
|
||||
#define DHCP_TAG_RENEWAL 58 /* Time to go into renewal state. */
|
||||
#define DHCP_TAG_REBINDING 59 /* Time to go into rebinding state. */
|
||||
#define DHCP_TAG_CLASSID 60 /* Class identifier. */
|
||||
#define DHCP_TAG_CLIENTID 61 /* Client identifier. */
|
||||
|
||||
/* DHCP messages: */
|
||||
#define DHCP_DISCOVER 1 /* Locate available servers. */
|
||||
#define DHCP_OFFER 2 /* Parameters offered to client. */
|
||||
#define DHCP_REQUEST 3 /* (Re)request offered parameters. */
|
||||
#define DHCP_DECLINE 4 /* Client declines offer. */
|
||||
#define DHCP_ACK 5 /* Server acknowlegdes request. */
|
||||
#define DHCP_NAK 6 /* Server denies request. */
|
||||
#define DHCP_RELEASE 7 /* Client relinguishes address. */
|
||||
#define DHCP_INFORM 8 /* Client requests just local config. */
|
||||
|
||||
void dhcp_init(dhcp_t *_dp);
|
||||
int dhcp_settag(dhcp_t *_dp, int _tag, void *_data, size_t _len);
|
||||
int dhcp_gettag(dhcp_t *_dp, int _searchtag, u8_t **_pdata, size_t *_plen);
|
||||
|
||||
#endif /* __NET__GEN__DHCP_H__ */
|
||||
15
include/net/gen/eth_hdr.h
Normal file
15
include/net/gen/eth_hdr.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
server/ip/gen/eth_hdr.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__ETH_HDR_H__
|
||||
#define __SERVER__IP__GEN__ETH_HDR_H__
|
||||
|
||||
typedef struct eth_hdr
|
||||
{
|
||||
ether_addr_t eh_dst;
|
||||
ether_addr_t eh_src;
|
||||
ether_type_t eh_proto;
|
||||
} eth_hdr_t;
|
||||
|
||||
#endif /* __SERVER__IP__GEN__ETH_HDR_H__ */
|
||||
79
include/net/gen/eth_io.h
Normal file
79
include/net/gen/eth_io.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
server/gen/ip/eth_io.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__ETH_IO_H__
|
||||
#define __SERVER__IP__GEN__ETH_IO_H__
|
||||
|
||||
typedef struct nwio_ethopt
|
||||
{
|
||||
u32_t nweo_flags;
|
||||
ether_addr_t nweo_multi, nweo_rem;
|
||||
ether_type_t nweo_type;
|
||||
} nwio_ethopt_t;
|
||||
|
||||
#define NWEO_NOFLAGS 0x0000L
|
||||
#define NWEO_ACC_MASK 0x0003L
|
||||
# define NWEO_EXCL 0x00000001L
|
||||
# define NWEO_SHARED 0x00000002L
|
||||
# define NWEO_COPY 0x00000003L
|
||||
#define NWEO_LOC_MASK 0x0010L
|
||||
# define NWEO_EN_LOC 0x00000010L
|
||||
# define NWEO_DI_LOC 0x00100000L
|
||||
#define NWEO_BROAD_MASK 0x0020L
|
||||
# define NWEO_EN_BROAD 0x00000020L
|
||||
# define NWEO_DI_BROAD 0x00200000L
|
||||
#define NWEO_MULTI_MASK 0x0040L
|
||||
# define NWEO_EN_MULTI 0x00000040L
|
||||
# define NWEO_DI_MULTI 0x00400000L
|
||||
#define NWEO_PROMISC_MASK 0x0080L
|
||||
# define NWEO_EN_PROMISC 0x00000080L
|
||||
# define NWEO_DI_PROMISC 0x00800000L
|
||||
#define NWEO_REM_MASK 0x0100L
|
||||
# define NWEO_REMSPEC 0x00000100L
|
||||
# define NWEO_REMANY 0x01000000L
|
||||
#define NWEO_TYPE_MASK 0x0200L
|
||||
# define NWEO_TYPESPEC 0x00000200L
|
||||
# define NWEO_TYPEANY 0x02000000L
|
||||
#define NWEO_RW_MASK 0x1000L
|
||||
# define NWEO_RWDATONLY 0x00001000L
|
||||
# define NWEO_RWDATALL 0x10000000L
|
||||
|
||||
typedef struct eth_stat
|
||||
{
|
||||
unsigned long ets_recvErr, /* # receive errors */
|
||||
ets_sendErr, /* # send error */
|
||||
ets_OVW, /* # buffer overwrite warnings,
|
||||
(packets arrive faster than
|
||||
can be processed) */
|
||||
ets_CRCerr, /* # crc errors of read */
|
||||
ets_frameAll, /* # frames not alligned (# bits
|
||||
not a mutiple of 8) */
|
||||
ets_missedP, /* # packets missed due to too
|
||||
slow packet processing */
|
||||
ets_packetR, /* # packets received */
|
||||
ets_packetT, /* # packets transmitted */
|
||||
ets_transDef, /* # transmission defered (there
|
||||
was a transmission of an
|
||||
other station in progress */
|
||||
ets_collision, /* # collissions */
|
||||
ets_transAb, /* # transmissions aborted due
|
||||
to accesive collisions */
|
||||
ets_carrSense, /* # carrier sense lost */
|
||||
ets_fifoUnder, /* # fifo underruns (processor
|
||||
is too busy) */
|
||||
ets_fifoOver, /* # fifo overruns (processor is
|
||||
too busy) */
|
||||
ets_CDheartbeat, /* # times unable to transmit
|
||||
collision signal */
|
||||
ets_OWC; /* # times out of window
|
||||
collision */
|
||||
} eth_stat_t;
|
||||
|
||||
typedef struct nwio_ethstat
|
||||
{
|
||||
ether_addr_t nwes_addr;
|
||||
eth_stat_t nwes_stat;
|
||||
} nwio_ethstat_t;
|
||||
|
||||
#endif /* __SERVER__IP__GEN__ETH_IO_H__ */
|
||||
34
include/net/gen/ether.h
Normal file
34
include/net/gen/ether.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
server/ip/gen/ether.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__ETHER_H__
|
||||
#define __SERVER__IP__GEN__ETHER_H__
|
||||
|
||||
#define ETH_MIN_PACK_SIZE 60
|
||||
#define ETH_MAX_PACK_SIZE 1514
|
||||
#define ETH_MAX_PACK_SIZE_TAGGED 1518
|
||||
#define ETH_HDR_SIZE 14
|
||||
#define ETH_CRC_SIZE 4
|
||||
|
||||
typedef struct ether_addr
|
||||
{
|
||||
u8_t ea_addr[6];
|
||||
} ether_addr_t;
|
||||
|
||||
typedef u16_t ether_type_t;
|
||||
|
||||
#define ETH_ARP_PROTO 0x806
|
||||
#define ETH_IP_PROTO 0x800
|
||||
#define ETH_VLAN_PROTO 0x8100
|
||||
|
||||
/* Tag Control Information field for VLAN and Priority tagging */
|
||||
#define ETH_TCI_PRIO_MASK 0xe000
|
||||
#define ETH_TCI_CFI 0x1000 /* Canonical Formal Indicator */
|
||||
#define ETH_TCI_VLAN_MASK 0x0fff /* 12-bit vlan number */
|
||||
|
||||
#endif /* __SERVER__IP__GEN__ETHER_H__ */
|
||||
|
||||
/*
|
||||
* $PchId: ether.h,v 1.6 2005/01/27 17:33:35 philip Exp $
|
||||
*/
|
||||
49
include/net/gen/icmp.h
Normal file
49
include/net/gen/icmp.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
server/ip/gen/icmp.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__ICMP_H__
|
||||
#define __SERVER__IP__GEN__ICMP_H__
|
||||
|
||||
#define ICMP_MIN_HDR_SIZE 4
|
||||
|
||||
#define ICMP_TYPE_ECHO_REPL 0
|
||||
#define ICMP_TYPE_DST_UNRCH 3
|
||||
# define ICMP_NET_UNRCH 0
|
||||
# define ICMP_HOST_UNRCH 1
|
||||
# define ICMP_PROTOCOL_UNRCH 2
|
||||
# define ICMP_PORT_UNRCH 3
|
||||
# define ICMP_FRAGM_AND_DF 4
|
||||
# define ICMP_SOURCE_ROUTE_FAILED 5
|
||||
#define ICMP_TYPE_SRC_QUENCH 4
|
||||
#define ICMP_TYPE_REDIRECT 5
|
||||
# define ICMP_REDIRECT_NET 0
|
||||
# define ICMP_REDIRECT_HOST 1
|
||||
# define ICMP_REDIRECT_TOS_AND_NET 2
|
||||
# define ICMP_REDIRECT_TOS_AND_HOST 3
|
||||
#define ICMP_TYPE_ECHO_REQ 8
|
||||
#define ICMP_TYPE_ROUTER_ADVER 9
|
||||
#define ICMP_TYPE_ROUTE_SOL 10
|
||||
#define ICMP_TYPE_TIME_EXCEEDED 11
|
||||
# define ICMP_TTL_EXC 0
|
||||
# define ICMP_FRAG_REASSEM 1
|
||||
#define ICMP_TYPE_PARAM_PROBLEM 12
|
||||
#define ICMP_TYPE_TS_REQ 13
|
||||
#define ICMP_TYPE_TS_REPL 14
|
||||
#define ICMP_TYPE_INFO_REQ 15
|
||||
#define ICMP_TYPE_INFO_REPL 16
|
||||
|
||||
/* Preferences for router advertisements. A router daemon installs itself
|
||||
* as the default router in the router's interfaces by sending router
|
||||
* advertisements to localhost with preference ICMP_RA_LOCAL_PREF.
|
||||
*/
|
||||
#define ICMP_RA_DEFAULT_PREF 0x00000000
|
||||
#define ICMP_RA_INVAL_PREF 0x80000000
|
||||
#define ICMP_RA_MAX_PREF 0x7fffffff
|
||||
#define ICMP_RA_LOCAL_PREF 0x10000000
|
||||
|
||||
#endif /* __SERVER__IP__GEN__ICMP_H__ */
|
||||
|
||||
/*
|
||||
* $PchId: icmp.h,v 1.6 2002/06/10 07:10:26 philip Exp $
|
||||
*/
|
||||
62
include/net/gen/icmp_hdr.h
Normal file
62
include/net/gen/icmp_hdr.h
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
server/ip/gen/icmp_hdr.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__ICMP_HDR_H__
|
||||
#define __SERVER__IP__GEN__ICMP_HDR_H__
|
||||
|
||||
typedef struct icmp_id_seq
|
||||
{
|
||||
u16_t iis_id, iis_seq;
|
||||
} icmp_id_seq_t;
|
||||
|
||||
typedef struct icmp_ip_id
|
||||
{
|
||||
ip_hdr_t iii_hdr;
|
||||
/* ip_hdr_options and 64 bytes of data */
|
||||
} icmp_ip_id_t;
|
||||
|
||||
typedef struct icmp_ram /* RFC 1256 */
|
||||
{
|
||||
u8_t iram_na;
|
||||
u8_t iram_aes;
|
||||
u16_t iram_lt;
|
||||
} icmp_ram_t;
|
||||
|
||||
typedef struct icmp_pp
|
||||
{
|
||||
u8_t ipp_ptr;
|
||||
u8_t ipp_unused[3];
|
||||
} icmp_pp_t;
|
||||
|
||||
typedef struct icmp_mtu /* RFC 1191 */
|
||||
{
|
||||
u16_t im_unused;
|
||||
u16_t im_mtu;
|
||||
} icmp_mtu_t;
|
||||
|
||||
typedef struct icmp_hdr
|
||||
{
|
||||
u8_t ih_type, ih_code;
|
||||
u16_t ih_chksum;
|
||||
union
|
||||
{
|
||||
u32_t ihh_unused;
|
||||
icmp_id_seq_t ihh_idseq;
|
||||
ipaddr_t ihh_gateway;
|
||||
icmp_ram_t ihh_ram;
|
||||
icmp_pp_t ihh_pp;
|
||||
icmp_mtu_t ihh_mtu;
|
||||
} ih_hun;
|
||||
union
|
||||
{
|
||||
icmp_ip_id_t ihd_ipid;
|
||||
u8_t uhd_data[1];
|
||||
} ih_dun;
|
||||
} icmp_hdr_t;
|
||||
|
||||
#endif /* __SERVER__IP__GEN__ICMP_HDR_H__ */
|
||||
|
||||
/*
|
||||
* $PchId: icmp_hdr.h,v 1.5 2002/06/10 07:10:48 philip Exp $
|
||||
*/
|
||||
18
include/net/gen/if_ether.h
Normal file
18
include/net/gen/if_ether.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
server/ip/gen/if_ether.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__IF_ETHER_H__
|
||||
#define __SERVER__IP__GEN__IF_ETHER_H__
|
||||
|
||||
struct ether_addr;
|
||||
|
||||
#define _PATH_ETHERS "/etc/ethers"
|
||||
|
||||
char *ether_ntoa _ARGS(( struct ether_addr *e ));
|
||||
struct ether_addr *ether_aton _ARGS(( const char *s ));
|
||||
int ether_ntohost _ARGS(( char *hostname, struct ether_addr *e ));
|
||||
int ether_hostton _ARGS(( char *hostname, struct ether_addr *e ));
|
||||
int ether_line _ARGS(( char *l, struct ether_addr *e, char *hostname ));
|
||||
|
||||
#endif /* __SERVER__IP__GEN__IF_ETHER_H__ */
|
||||
40
include/net/gen/in.h
Normal file
40
include/net/gen/in.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
server/ip/gen/in.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__IN_H__
|
||||
#define __SERVER__IP__GEN__IN_H__
|
||||
|
||||
#include <net/gen/in.h>
|
||||
#include <minix/types.h>
|
||||
|
||||
#define IP_MIN_HDR_SIZE 20
|
||||
#define IP_MAX_HDR_SIZE 60 /* 15 * 4 */
|
||||
#define IP_VERSION 4
|
||||
#define IP_DEF_TTL 64
|
||||
#define IP_MAX_TTL 255
|
||||
#define IP_DEF_MTU 576
|
||||
#define IP_MIN_MTU (IP_MAX_HDR_SIZE+8)
|
||||
#define IP_MAX_PACKSIZE 40000
|
||||
/* Note: this restriction is not part of the IP-protocol but
|
||||
introduced by this implementation. */
|
||||
|
||||
#define IPPROTO_ICMP 1
|
||||
#define IPPROTO_TCP 6
|
||||
#define IPPROTO_UDP 17
|
||||
|
||||
#define IP_MC_ALL_SYSTEMS 0xE0000001 /* 224.0.0.1 */
|
||||
|
||||
typedef u32_t ipaddr_t;
|
||||
typedef u8_t ipproto_t;
|
||||
typedef struct ip_hdropt
|
||||
{
|
||||
u8_t iho_opt_siz;
|
||||
u8_t iho_data[IP_MAX_HDR_SIZE-IP_MIN_HDR_SIZE];
|
||||
} ip_hdropt_t;
|
||||
|
||||
#endif /* __SERVER__IP__GEN__IN_H__ */
|
||||
|
||||
/*
|
||||
* $PchId: in.h,v 1.6 2002/06/10 07:11:15 philip Exp $
|
||||
*/
|
||||
15
include/net/gen/inet.h
Normal file
15
include/net/gen/inet.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
server/ip/gen/inet.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__INET_H__
|
||||
#define __SERVER__IP__GEN__INET_H__
|
||||
|
||||
#include <net/gen/in.h>
|
||||
|
||||
ipaddr_t inet_addr _ARGS(( const char *addr ));
|
||||
ipaddr_t inet_network _ARGS(( const char *addr ));
|
||||
char *inet_ntoa _ARGS(( ipaddr_t addr ));
|
||||
int inet_aton _ARGS(( const char *cp, ipaddr_t *pin ));
|
||||
|
||||
#endif /* __SERVER__IP__GEN__INET_H__ */
|
||||
47
include/net/gen/ip_hdr.h
Normal file
47
include/net/gen/ip_hdr.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
server/ip/gen/ip_hdr.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__HDR_H__
|
||||
#define __SERVER__IP__GEN__HDR_H__
|
||||
|
||||
typedef struct ip_hdr
|
||||
{
|
||||
u8_t ih_vers_ihl,
|
||||
ih_tos;
|
||||
u16_t ih_length,
|
||||
ih_id,
|
||||
ih_flags_fragoff;
|
||||
u8_t ih_ttl,
|
||||
ih_proto;
|
||||
u16_t ih_hdr_chk;
|
||||
ipaddr_t ih_src,
|
||||
ih_dst;
|
||||
} ip_hdr_t;
|
||||
|
||||
#define IH_IHL_MASK 0xf
|
||||
#define IH_VERSION_MASK 0xf
|
||||
#define IH_FRAGOFF_MASK 0x1fff
|
||||
#define IH_MORE_FRAGS 0x2000
|
||||
#define IH_DONT_FRAG 0x4000
|
||||
#define IH_FLAGS_UNUSED 0x8000
|
||||
|
||||
#define IP_OPT_COPIED 0x80
|
||||
#define IP_OPT_NUMBER 0x1f
|
||||
|
||||
#define IP_OPT_EOL 0x00 /* End of Options List, RFC-791 */
|
||||
#define IP_OPT_NOP 0x01 /* No Operation, RFC-791 */
|
||||
#define IP_OPT_RR 0x07 /* Record Route, RFC-791 */
|
||||
#define IP_OPT_TS 0x44 /* Timestamp, RFC-791 */
|
||||
#define IP_OPT_SEC 0x82 /* Security, RFC-1108 */
|
||||
#define IP_OPT_LSRR 0x83 /* Loose Source Route, RFC-791 */
|
||||
#define IP_OPT_SSRR 0x89 /* Strict Source Route, RFC-791 */
|
||||
#define IP_OPT_RTRALT 0x94 /* Router Alert, RFC-2113 */
|
||||
|
||||
#define IP_OPT_RR_MIN 4
|
||||
|
||||
#endif /* __SERVER__IP__GEN__HDR_H__ */
|
||||
|
||||
/*
|
||||
* $PchId: ip_hdr.h,v 1.5 2002/06/10 07:11:46 philip Exp $
|
||||
*/
|
||||
68
include/net/gen/ip_io.h
Normal file
68
include/net/gen/ip_io.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
server/ip/gen/ip_io.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__IP_IO_H__
|
||||
#define __SERVER__IP__GEN__IP_IO_H__
|
||||
|
||||
typedef struct nwio_ipconf2
|
||||
{
|
||||
u32_t nwic_flags;
|
||||
ipaddr_t nwic_ipaddr;
|
||||
ipaddr_t nwic_netmask;
|
||||
} nwio_ipconf2_t;
|
||||
|
||||
typedef struct nwio_ipconf
|
||||
{
|
||||
u32_t nwic_flags;
|
||||
ipaddr_t nwic_ipaddr;
|
||||
ipaddr_t nwic_netmask;
|
||||
u16_t nwic_mtu;
|
||||
} nwio_ipconf_t;
|
||||
|
||||
#define NWIC_NOFLAGS 0x0
|
||||
#define NWIC_FLAGS 0x7
|
||||
# define NWIC_IPADDR_SET 0x1
|
||||
# define NWIC_NETMASK_SET 0x2
|
||||
# define NWIC_MTU_SET 0x4
|
||||
|
||||
typedef struct nwio_ipopt
|
||||
{
|
||||
u32_t nwio_flags;
|
||||
ipaddr_t nwio_rem;
|
||||
ip_hdropt_t nwio_hdropt;
|
||||
u8_t nwio_tos;
|
||||
u8_t nwio_ttl;
|
||||
u8_t nwio_df;
|
||||
ipproto_t nwio_proto;
|
||||
} nwio_ipopt_t;
|
||||
|
||||
#define NWIO_NOFLAGS 0x0000l
|
||||
#define NWIO_ACC_MASK 0x0003l
|
||||
# define NWIO_EXCL 0x00000001l
|
||||
# define NWIO_SHARED 0x00000002l
|
||||
# define NWIO_COPY 0x00000003l
|
||||
#define NWIO_LOC_MASK 0x0010l
|
||||
# define NWIO_EN_LOC 0x00000010l
|
||||
# define NWIO_DI_LOC 0x00100000l
|
||||
#define NWIO_BROAD_MASK 0x0020l
|
||||
# define NWIO_EN_BROAD 0x00000020l
|
||||
# define NWIO_DI_BROAD 0x00200000l
|
||||
#define NWIO_REM_MASK 0x0100l
|
||||
# define NWIO_REMSPEC 0x00000100l
|
||||
# define NWIO_REMANY 0x01000000l
|
||||
#define NWIO_PROTO_MASK 0x0200l
|
||||
# define NWIO_PROTOSPEC 0x00000200l
|
||||
# define NWIO_PROTOANY 0x02000000l
|
||||
#define NWIO_HDR_O_MASK 0x0400l
|
||||
# define NWIO_HDR_O_SPEC 0x00000400l
|
||||
# define NWIO_HDR_O_ANY 0x04000000l
|
||||
#define NWIO_RW_MASK 0x1000l
|
||||
# define NWIO_RWDATONLY 0x00001000l
|
||||
# define NWIO_RWDATALL 0x10000000l
|
||||
|
||||
#endif /* __SERVER__IP__GEN__IP_IO_H__ */
|
||||
|
||||
/*
|
||||
* $PchId: ip_io.h,v 1.5 2001/03/12 22:17:25 philip Exp $
|
||||
*/
|
||||
@@ -1,125 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1983, 1989 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted
|
||||
* provided that: (1) source distributions retain this entire copyright
|
||||
* notice and comment, and (2) distributions including binaries display
|
||||
* the following acknowledgement: ``This product includes software
|
||||
* developed by the University of California, Berkeley and its contributors''
|
||||
* in the documentation or other materials provided with the distribution
|
||||
* and in all advertising materials mentioning features or use of this
|
||||
* software. Neither the name of the University nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* @(#)nameser.h 5.24 (Berkeley) 6/1/90
|
||||
*/
|
||||
|
||||
/*
|
||||
server/ip/gen/nameser.h
|
||||
|
||||
Created Sept 18, 1991 by Philip Homburg
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__NAEMSER_H__
|
||||
#define __SERVER__IP__GEN__NAEMSER_H__
|
||||
|
||||
typedef struct dns_hdr
|
||||
{
|
||||
u16_t dh_id;
|
||||
u8_t dh_flag1;
|
||||
u8_t dh_flag2;
|
||||
u16_t dh_qdcount;
|
||||
u16_t dh_ancount;
|
||||
u16_t dh_nscount;
|
||||
u16_t dh_arcount;
|
||||
} dns_hdr_t;
|
||||
|
||||
typedef dns_hdr_t HEADER;
|
||||
|
||||
#define DHF_QR 0x80
|
||||
#define DHF_OPCODE 0x78
|
||||
#define DHF_AA 0x04
|
||||
#define DHF_TC 0x02
|
||||
#define DHF_RD 0x01
|
||||
|
||||
#define DHF_RA 0x80
|
||||
#define DHF_PR 0x40
|
||||
#define DHF_UNUSED 0x30
|
||||
#define DHF_RCODE 0x0F
|
||||
|
||||
/*
|
||||
Define constants based on rfc883
|
||||
*/
|
||||
#define PACKETSZ 512 /* maximum packet size */
|
||||
#define MAXDNAME 256 /* maximum domain name */
|
||||
#define MAXCDNAME 255 /* maximum compressed domain name */
|
||||
#define MAXLABEL 63 /* maximum length of domain label */
|
||||
/* Number of bytes of fixed size data in query structure */
|
||||
#define QFIXEDSZ 4
|
||||
/* number of bytes of fixed size data in resource record */
|
||||
#define RRFIXEDSZ 10
|
||||
#define INDIR_MASK 0xc0
|
||||
/* Defines for handling compressed domain names */
|
||||
|
||||
/*
|
||||
Opcodes for DNS
|
||||
*/
|
||||
|
||||
#define QUERY 0x0 /* standard query */
|
||||
#define IQUERY 0x1 /* inverse query */
|
||||
|
||||
/*
|
||||
Error codes
|
||||
*/
|
||||
#define NOERROR 0 /* no error */
|
||||
#define FORMERR 1 /* format error */
|
||||
#define SERVFAIL 2 /* server failure */
|
||||
#define NXDOMAIN 3 /* non existent domain */
|
||||
#define NOTIMP 4 /* not implemented */
|
||||
#define REFUSED 5 /* query refused */
|
||||
/* non standard */
|
||||
#define NOCHANGE 0xf /* update failed to change db */
|
||||
|
||||
/* Valid types */
|
||||
|
||||
#define T_A 1 /* host address */
|
||||
#define T_NS 2 /* authoritative server */
|
||||
#define T_MD 3 /* mail destination */
|
||||
#define T_MF 4 /* mail forwarder */
|
||||
#define T_CNAME 5 /* connonical name */
|
||||
#define T_SOA 6 /* start of authority zone */
|
||||
#define T_MB 7 /* mailbox domain name */
|
||||
#define T_MG 8 /* mail group member */
|
||||
#define T_MR 9 /* mail rename name */
|
||||
#define T_NULL 10 /* null resource record */
|
||||
#define T_WKS 11 /* well known service */
|
||||
#define T_PTR 12 /* domain name pointer */
|
||||
#define T_HINFO 13 /* host information */
|
||||
#define T_MINFO 14 /* mailbox information */
|
||||
#define T_MX 15 /* mail routing information */
|
||||
#define T_TXT 16 /* text strings */
|
||||
/* non standard */
|
||||
#define T_UINFO 100 /* user (finger) information */
|
||||
#define T_UID 101 /* user ID */
|
||||
#define T_GID 102 /* group ID */
|
||||
#define T_UNSPEC 103 /* Unspecified format (binary data) */
|
||||
/* Query type values which do not appear in resource records */
|
||||
#define T_AXFR 252 /* transfer zone of authority */
|
||||
#define T_MAILB 253 /* transfer mailbox records */
|
||||
#define T_MAILA 254 /* transfer mail agent records */
|
||||
#define T_ANY 255 /* wildcard match */
|
||||
|
||||
/* Valid classes */
|
||||
|
||||
#define C_IN 1 /* the internet */
|
||||
#define C_CHAOS 3 /* for chaos net (MIT) */
|
||||
#define C_HS 4 /* for Hesiod name server at MIT */
|
||||
|
||||
#define C_ANY 255 /* wildcard */
|
||||
|
||||
#endif /* __SERVER__IP__GEN__NAEMSER_H__ */
|
||||
@@ -1,198 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 1980, 1983, 1988 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)netdb.h 5.15 (Berkeley) 4/3/91
|
||||
*/
|
||||
|
||||
#ifndef _NETDB_H_
|
||||
#define _NETDB_H_
|
||||
|
||||
#define _PATH_HEQUIV "/etc/hosts.equiv"
|
||||
#define _PATH_HOSTS "/etc/hosts"
|
||||
#define _PATH_NETWORKS "/etc/networks"
|
||||
#define _PATH_PROTOCOLS "/etc/protocols"
|
||||
#define _PATH_SERVICES "/etc/services"
|
||||
#define _PATH_SERVACCES "/etc/serv.access"
|
||||
|
||||
/*
|
||||
* Structures returned by network data base library. All addresses are
|
||||
* supplied in host order, and returned in network order (suitable for
|
||||
* use in system calls).
|
||||
*/
|
||||
struct hostent {
|
||||
char *h_name; /* official name of host */
|
||||
char **h_aliases; /* alias list */
|
||||
int h_addrtype; /* host address type */
|
||||
int h_length; /* length of address */
|
||||
char **h_addr_list; /* list of addresses from name server */
|
||||
#define h_addr h_addr_list[0] /* address, for backward compatiblity */
|
||||
};
|
||||
|
||||
/*
|
||||
* Assumption here is that a network number
|
||||
* fits in 32 bits -- probably a poor one.
|
||||
*/
|
||||
struct netent {
|
||||
char *n_name; /* official name of net */
|
||||
char **n_aliases; /* alias list */
|
||||
int n_addrtype; /* net address type */
|
||||
unsigned long n_net; /* network # */
|
||||
};
|
||||
|
||||
struct servent {
|
||||
char *s_name; /* official service name */
|
||||
char **s_aliases; /* alias list */
|
||||
int s_port; /* port # */
|
||||
char *s_proto; /* protocol to use */
|
||||
};
|
||||
|
||||
struct protoent {
|
||||
char *p_name; /* official protocol name */
|
||||
char **p_aliases; /* alias list */
|
||||
int p_proto; /* protocol # */
|
||||
};
|
||||
|
||||
/*
|
||||
* Error return codes from gethostbyname() and gethostbyaddr()
|
||||
* (left in extern int h_errno).
|
||||
*/
|
||||
extern int h_errno;
|
||||
|
||||
#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
|
||||
#define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */
|
||||
#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
|
||||
#define NO_DATA 4 /* Valid name, no data record of requested type */
|
||||
#define NO_ADDRESS NO_DATA /* no address, look for MX record */
|
||||
|
||||
#ifndef _MINIX_ANSI_H
|
||||
#include <minix/ansi.h>
|
||||
#endif
|
||||
|
||||
void endhostent _ARGS((void));
|
||||
void endnetent _ARGS((void));
|
||||
void endprotoent _ARGS((void));
|
||||
void endservent _ARGS((void));
|
||||
struct hostent *gethostbyaddr _ARGS((const char *, int, int));
|
||||
struct hostent *gethostbyname _ARGS((const char *));
|
||||
struct hostent *gethostent _ARGS((void));
|
||||
struct netent *getnetbyaddr _ARGS((long, int)); /* u_long? */
|
||||
struct netent *getnetbyname _ARGS((const char *));
|
||||
struct netent *getnetent _ARGS((void));
|
||||
struct protoent *getprotobyname _ARGS((const char *));
|
||||
struct protoent *getprotobynumber _ARGS((int));
|
||||
struct protoent *getprotoent _ARGS((void));
|
||||
struct servent *getservbyname _ARGS((const char *, const char *));
|
||||
struct servent *getservbyport _ARGS((int, const char *));
|
||||
struct servent *getservent _ARGS((void));
|
||||
void herror _ARGS((const char *));
|
||||
void sethostent _ARGS((int));
|
||||
/* void sethostfile _ARGS((const char *)); */
|
||||
void setnetent _ARGS((int));
|
||||
void setprotoent _ARGS((int));
|
||||
void setservent _ARGS((int));
|
||||
#ifdef _MINIX
|
||||
int servxcheck _ARGS((unsigned long _peer, const char *_service,
|
||||
void (*_logf) _ARGS((int _pass, const char *_name))));
|
||||
char *servxfile _ARGS((const char *_file));
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The definitions below are based on
|
||||
* http://www.opengroup.org/onlinepubs/009695399/basedefs/netdb.h.html
|
||||
*/
|
||||
|
||||
#ifdef _POSIX_SOURCE
|
||||
|
||||
/* headers exposed by netdb.h */
|
||||
#include <inttypes.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
/* struct for use with getaddrinfo() */
|
||||
struct addrinfo
|
||||
{
|
||||
int ai_flags; /* Input flags */
|
||||
int ai_family; /* Address family of socket */
|
||||
int ai_socktype; /* Socket type */
|
||||
int ai_protocol; /* Protocol of socket */
|
||||
socklen_t ai_addrlen; /* Length of socket address */
|
||||
struct sockaddr *ai_addr; /* Socket address of socket */
|
||||
char *ai_canonname; /* Canonical name of service location */
|
||||
struct addrinfo *ai_next; /* Pointer to next in list */
|
||||
};
|
||||
|
||||
/* values for struct addrinfo.ai_flags */
|
||||
#define AI_PASSIVE 0x00000001
|
||||
#define AI_CANONNAME 0x00000002
|
||||
#define AI_NUMERICHOST 0x00000004
|
||||
#define AI_NUMERICSERV 0x00000008
|
||||
/*
|
||||
#define AI_V4MAPPED 0x00000010
|
||||
#define AI_ALL 0x00000020
|
||||
#define AI_ADDRCONFIG 0x00000040
|
||||
*/
|
||||
|
||||
/* flags for getnameinfo() */
|
||||
/* #define NI_NOFQDN 0x00000001 */
|
||||
#define NI_NUMERICHOST 0x00000002
|
||||
#define NI_NAMEREQD 0x00000004
|
||||
#define NI_NUMERICSERV 0x00000008
|
||||
/* #define NI_NUMERICSCOPE 0x00000010 */
|
||||
#define NI_DGRAM 0x00000020
|
||||
|
||||
/* error values for getaddrinfo() and getnameinfo() */
|
||||
#define EAI_AGAIN 1
|
||||
#define EAI_BADFLAGS 2
|
||||
#define EAI_FAIL 3
|
||||
#define EAI_FAMILY 4
|
||||
#define EAI_MEMORY 5
|
||||
#define EAI_NONAME 6
|
||||
#define EAI_SERVICE 7
|
||||
#define EAI_SOCKTYPE 8
|
||||
#define EAI_SYSTEM 9
|
||||
#define EAI_OVERFLOW 10
|
||||
|
||||
/* getaddrinfo() and friends */
|
||||
void freeaddrinfo(struct addrinfo *ai);
|
||||
int getaddrinfo(const char *nodename,
|
||||
const char *servname,
|
||||
const struct addrinfo *hints,
|
||||
struct addrinfo **res);
|
||||
int getnameinfo(const struct sockaddr *sa, socklen_t salen,
|
||||
char *node, socklen_t nodelen, char *service,
|
||||
socklen_t servicelen, int flags);
|
||||
const char *gai_strerror(int ecode);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* !_NETDB_H_ */
|
||||
|
||||
10
include/net/gen/oneCsum.h
Normal file
10
include/net/gen/oneCsum.h
Normal file
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
server/ip/gen/oneCsum.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__ONECSUM_H__
|
||||
#define __SERVER__IP__GEN__ONECSUM_H__
|
||||
|
||||
u16_t oneC_sum _ARGS(( u16_t prev, void *data, size_t data_len ));
|
||||
|
||||
#endif /* __SERVER__IP__GEN__ONECSUM_H__ */
|
||||
23
include/net/gen/psip_hdr.h
Normal file
23
include/net/gen/psip_hdr.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
server/ip/gen/psip_hdr.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__PSIP_HDR_H__
|
||||
#define __SERVER__IP__GEN__PSIP_HDR_H__
|
||||
|
||||
typedef struct psip_io_hdr
|
||||
{
|
||||
u8_t pih_flags;
|
||||
u8_t pih_dummy[3];
|
||||
u32_t pih_nexthop;
|
||||
} psip_io_hdr_t;
|
||||
|
||||
#define PF_LOC_REM_MASK 1
|
||||
#define PF_LOC2REM 0
|
||||
#define PF_REM2LOC 1
|
||||
|
||||
#endif /* __SERVER__IP__GEN__PSIP_HDR_H__ */
|
||||
|
||||
/*
|
||||
* $PchId: psip_hdr.h,v 1.3 2001/02/19 07:35:38 philip Exp $
|
||||
*/
|
||||
24
include/net/gen/psip_io.h
Normal file
24
include/net/gen/psip_io.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
server/ip/gen/psip_io.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__PSIP_IO_H__
|
||||
#define __SERVER__IP__GEN__PSIP_IO_H__
|
||||
|
||||
typedef struct nwio_psipopt
|
||||
{
|
||||
unsigned long nwpo_flags;
|
||||
} nwio_psipopt_t;
|
||||
|
||||
#define NWPO_PROMISC_MASK 0x0001L
|
||||
#define NWPO_EN_PROMISC 0x00000001L
|
||||
#define NWUO_DI_PROMISC 0x00010000L
|
||||
#define NWPO_NEXTHOP_MASK 0x0002L
|
||||
#define NWPO_EN_NEXTHOP 0x00000002L
|
||||
#define NWUO_DI_NEXTHOP 0x00020000L
|
||||
|
||||
#endif /* __SERVER__IP__GEN__PSIP_IO_H__ */
|
||||
|
||||
/*
|
||||
* $PchId: psip_io.h,v 1.3 2001/02/19 07:35:58 philip Exp $
|
||||
*/
|
||||
@@ -1,107 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1983, 1987, 1989 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted
|
||||
* provided that: (1) source distributions retain this entire copyright
|
||||
* notice and comment, and (2) distributions including binaries display
|
||||
* the following acknowledgement: ``This product includes software
|
||||
* developed by the University of California, Berkeley and its contributors''
|
||||
* in the documentation or other materials provided with the distribution
|
||||
* and in all advertising materials mentioning features or use of this
|
||||
* software. Neither the name of the University nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* @(#)resolv.h 5.10 (Berkeley) 6/1/90
|
||||
*/
|
||||
#ifndef _NET__GEN__RESOLV_H
|
||||
#define _NET__GEN__RESOLV_H
|
||||
|
||||
/*
|
||||
* Resolver configuration file.
|
||||
* Normally not present, but may contain the address of the
|
||||
* inital name server(s) to query and the domain search list.
|
||||
*/
|
||||
|
||||
#ifndef _PATH_RESCONF
|
||||
#define _PATH_RESCONF "/etc/resolv.conf"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Global defines and variables for resolver stub.
|
||||
*/
|
||||
#define MAXNS 3 /* max # name servers we'll track */
|
||||
#define MAXDFLSRCH 3 /* # default domain levels to try */
|
||||
#define MAXDNSRCH 6 /* max # domains in search path */
|
||||
#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */
|
||||
|
||||
#define RES_TIMEOUT 5 /* min. seconds between retries */
|
||||
|
||||
#define NAMESERVER_PORT 53
|
||||
|
||||
struct state {
|
||||
int retrans; /* retransmition time interval */
|
||||
int retry; /* number of times to retransmit */
|
||||
long options; /* option flags - see below. */
|
||||
int nscount; /* number of name servers */
|
||||
ipaddr_t nsaddr_list[MAXNS]; /* address of name server */
|
||||
#define nsaddr nsaddr_list[0] /* for backward compatibility */
|
||||
u16_t nsport_list[MAXNS]; /* port of name server */
|
||||
u16_t id; /* current packet id */
|
||||
char defdname[MAXDNAME]; /* default domain */
|
||||
char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
|
||||
};
|
||||
|
||||
/*
|
||||
* Resolver options
|
||||
*/
|
||||
#define RES_INIT 0x0001 /* address initialized */
|
||||
#define RES_DEBUG 0x0002 /* print debug messages */
|
||||
#define RES_AAONLY 0x0004 /* authoritative answers only */
|
||||
#define RES_USEVC 0x0008 /* use virtual circuit */
|
||||
#define RES_PRIMARY 0x0010 /* query primary server only */
|
||||
#define RES_IGNTC 0x0020 /* ignore trucation errors */
|
||||
#define RES_RECURSE 0x0040 /* recursion desired */
|
||||
#define RES_DEFNAMES 0x0080 /* use default domain name */
|
||||
#define RES_STAYOPEN 0x0100 /* Keep TCP socket open */
|
||||
#define RES_DNSRCH 0x0200 /* search up local domain tree */
|
||||
|
||||
#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH )
|
||||
|
||||
extern struct state _res;
|
||||
|
||||
struct rrec;
|
||||
|
||||
int res_init _ARGS(( void ));
|
||||
int res_mkquery _ARGS(( int op, const char *dname, int cls, int type,
|
||||
const char *data, int datalen, const struct rrec *newrr,
|
||||
char *buf, int buflen ));
|
||||
int res_query _ARGS(( char *name, int cls, int type, u8_t *answer,
|
||||
int anslen ));
|
||||
int res_querydomain _ARGS(( char *name, char *domain, int cls, int type,
|
||||
u8_t *answer, int anslen ));
|
||||
int res_search _ARGS(( char *name, int cls, int type, u8_t *answer,
|
||||
int anslen ));
|
||||
int res_send _ARGS(( const char *buf, int buflen, char *answer, int anslen ));
|
||||
void _res_close _ARGS(( void ));
|
||||
|
||||
int dn_comp _ARGS(( const u8_t *exp_dn, u8_t *comp_dn, int length,
|
||||
u8_t **dnptrs, u8_t **lastdnptr ));
|
||||
int dn_expand _ARGS(( const u8_t *msg, const u8_t *eomorig,
|
||||
const u8_t *comp_dn, u8_t *exp_dn, int length ));
|
||||
int dn_skipname _ARGS(( const u8_t *comp_dn, const u8_t *eom ));
|
||||
|
||||
char *__hostalias _ARGS(( const char *name ));
|
||||
|
||||
u16_t _getshort _ARGS(( const u8_t *msgp ));
|
||||
u32_t _getlong _ARGS(( const u8_t *msgp ));
|
||||
void __putshort _ARGS(( u16_t s, u8_t *msgp ));
|
||||
void __putlong _ARGS(( u32_t l, u8_t *msgp ));
|
||||
|
||||
void p_query _ARGS(( char *msg ));
|
||||
|
||||
#endif /* _NET__GEN__RESOLV_H */
|
||||
77
include/net/gen/rip.h
Normal file
77
include/net/gen/rip.h
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
net/gen/rip.h
|
||||
|
||||
Definitions for the Routing Information Protocol (RFC-1058).
|
||||
|
||||
Created: Aug 16, 1993 by Philip Homburg <philip@cs.vu.nl>
|
||||
*/
|
||||
|
||||
#ifndef NET__GEN__RIP_H
|
||||
#define NET__GEN__RIP_H
|
||||
|
||||
typedef struct rip_hdr
|
||||
{
|
||||
u8_t rh_command;
|
||||
u8_t rh_version;
|
||||
u16_t rh_zero;
|
||||
} rip_hdr_t;
|
||||
|
||||
#define RHC_REQUEST 1
|
||||
#define RHC_RESPONSE 2
|
||||
|
||||
#define RIP_ENTRY_MAX 25
|
||||
|
||||
typedef struct rip_entry
|
||||
{
|
||||
union
|
||||
{
|
||||
struct rip_entry_v1
|
||||
{
|
||||
u16_t re_family;
|
||||
u16_t re_zero0;
|
||||
u32_t re_address;
|
||||
u32_t re_zero1;
|
||||
u32_t re_zero2;
|
||||
u32_t re_metric;
|
||||
} v1;
|
||||
struct rip_entry_v2
|
||||
{
|
||||
u16_t re_family;
|
||||
u16_t re_tag;
|
||||
u32_t re_address;
|
||||
u32_t re_mask;
|
||||
u32_t re_nexthop;
|
||||
u32_t re_metric;
|
||||
} v2;
|
||||
} u;
|
||||
} rip_entry_t;
|
||||
|
||||
#define RIP_FAMILY_IP 2
|
||||
#define RIP_INFINITY 16
|
||||
|
||||
#define RIP_UDP_PORT 520
|
||||
#define RIP_PERIOD 30 /* A responce is sent once every
|
||||
* RIP_PERIOD seconds
|
||||
*/
|
||||
#define RIP_FUZZ 10 /* The actual value used is RIP_FREQUENCE -
|
||||
* a random number of at most RIP_FUZZ.
|
||||
*/
|
||||
#define RIP_TIMEOUT 180 /* A route is dead after RIP_TIMEOUT seconds */
|
||||
#define RIP_DELETE_TO 120 /* A dead route is removed after RIP_DELETE_TO
|
||||
* seconds
|
||||
*/
|
||||
|
||||
#ifdef __RIP_DEBUG
|
||||
#undef RIP_PERIOD
|
||||
#define RIP_PERIOD 15
|
||||
#undef RIP_TIMEOUT
|
||||
#define RIP_TIMEOUT 10
|
||||
#undef RIP_DELETE_TO
|
||||
#define RIP_DELETE_TO 10
|
||||
#endif /* __RIP_DEBUG */
|
||||
|
||||
#endif /* NET__GEN__RIP_H */
|
||||
|
||||
/*
|
||||
* $PchId: rip.h,v 1.3 1995/11/17 22:21:16 philip Exp $
|
||||
*/
|
||||
31
include/net/gen/route.h
Normal file
31
include/net/gen/route.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
server/ip/gen/route.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__ROUTE_H__
|
||||
#define __SERVER__IP__GEN__ROUTE_H__
|
||||
|
||||
typedef struct nwio_route
|
||||
{
|
||||
u32_t nwr_ent_no;
|
||||
u32_t nwr_ent_count;
|
||||
ipaddr_t nwr_dest;
|
||||
ipaddr_t nwr_netmask;
|
||||
ipaddr_t nwr_gateway;
|
||||
u32_t nwr_dist;
|
||||
u32_t nwr_flags;
|
||||
u32_t nwr_pref;
|
||||
u32_t nwr_mtu; /* Ignored, compatibility with VMD */
|
||||
ipaddr_t nwr_ifaddr;
|
||||
} nwio_route_t;
|
||||
|
||||
#define NWRF_EMPTY 0
|
||||
#define NWRF_INUSE 1
|
||||
#define NWRF_STATIC 2
|
||||
#define NWRF_UNREACHABLE 4
|
||||
|
||||
#endif /* __SERVER__IP__GEN__ROUTE_H__ */
|
||||
|
||||
/*
|
||||
* $PchId: route.h,v 1.3 1995/11/17 22:19:50 philip Exp $
|
||||
*/
|
||||
42
include/net/gen/socket.h
Normal file
42
include/net/gen/socket.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
server/ip/gen/socket.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__SOCKET_H__
|
||||
#define __SERVER__IP__GEN__SOCKET_H__
|
||||
|
||||
/* From SunOS: /usr/include/sys/socketh */
|
||||
|
||||
/*
|
||||
* Address families.
|
||||
*/
|
||||
#define AF_UNSPEC 0 /* unspecified */
|
||||
#define AF_UNIX 1 /* local to host (pipes, portals) */
|
||||
#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
|
||||
#define AF_IMPLINK 3 /* arpanet imp addresses */
|
||||
#define AF_PUP 4 /* pup protocols: e.g. BSP */
|
||||
#define AF_CHAOS 5 /* mit CHAOS protocols */
|
||||
#define AF_NS 6 /* XEROX NS protocols */
|
||||
#define AF_NBS 7 /* nbs protocols */
|
||||
#define AF_ECMA 8 /* european computer manufacturers */
|
||||
#define AF_DATAKIT 9 /* datakit protocols */
|
||||
#define AF_CCITT 10 /* CCITT protocols, X.25 etc */
|
||||
#define AF_SNA 11 /* IBM SNA */
|
||||
#define AF_DECnet 12 /* DECnet */
|
||||
#define AF_DLI 13 /* Direct data link interface */
|
||||
#define AF_LAT 14 /* LAT */
|
||||
#define AF_HYLINK 15 /* NSC Hyperchannel */
|
||||
#define AF_APPLETALK 16 /* Apple Talk */
|
||||
|
||||
#define AF_NIT 17 /* Network Interface Tap */
|
||||
#define AF_802 18 /* IEEE 802.2, also ISO 8802 */
|
||||
#define AF_OSI 19 /* umbrella for all families used
|
||||
* by OSI (e.g. protosw lookup) */
|
||||
#define AF_X25 20 /* CCITT X.25 in particular */
|
||||
#define AF_OSINET 21 /* AFI = 47, IDI = 4 */
|
||||
#define AF_GOSIP 22 /* U.S. Government OSI */
|
||||
#define AF_INET6 23 /* IP version 6 */
|
||||
|
||||
#define AF_MAX 23
|
||||
|
||||
#endif /* __SERVER__IP__GEN__SOCKET_H__ */
|
||||
18
include/net/gen/tcp.h
Normal file
18
include/net/gen/tcp.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
server/ip/gen/tcp.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__TCP_H__
|
||||
#define __SERVER__IP__GEN__TCP_H__
|
||||
|
||||
#define TCP_MIN_HDR_SIZE 20
|
||||
#define TCP_MAX_HDR_SIZE 60
|
||||
|
||||
#define TCPPORT_TELNET 23
|
||||
#define TCPPORT_FINGER 79
|
||||
|
||||
#define TCPPORT_RESERVED 1024
|
||||
|
||||
typedef u16_t tcpport_t;
|
||||
|
||||
#endif /* __SERVER__IP__GEN__TCP_H__ */
|
||||
49
include/net/gen/tcp_hdr.h
Normal file
49
include/net/gen/tcp_hdr.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
server/ip/gen/tcp_hdr.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__TCP_HDR_H__
|
||||
#define __SERVER__IP__GEN__TCP_HDR_H__
|
||||
|
||||
typedef struct tcp_hdr
|
||||
{
|
||||
tcpport_t th_srcport;
|
||||
tcpport_t th_dstport;
|
||||
u32_t th_seq_nr;
|
||||
u32_t th_ack_nr;
|
||||
u8_t th_data_off;
|
||||
u8_t th_flags;
|
||||
u16_t th_window;
|
||||
u16_t th_chksum;
|
||||
u16_t th_urgptr;
|
||||
} tcp_hdr_t;
|
||||
|
||||
#define TH_DO_MASK 0xf0
|
||||
|
||||
#define TH_FLAGS_MASK 0x3f
|
||||
#define THF_FIN 0x1
|
||||
#define THF_SYN 0x2
|
||||
#define THF_RST 0x4
|
||||
#define THF_PSH 0x8
|
||||
#define THF_ACK 0x10
|
||||
#define THF_URG 0x20
|
||||
|
||||
typedef struct tcp_hdropt
|
||||
{
|
||||
int tho_opt_siz;
|
||||
u8_t tho_data[TCP_MAX_HDR_SIZE-TCP_MIN_HDR_SIZE];
|
||||
} tcp_hdropt_t;
|
||||
|
||||
#define TCP_OPT_EOL 0
|
||||
#define TCP_OPT_NOP 1
|
||||
#define TCP_OPT_MSS 2
|
||||
#define TCP_OPT_WSOPT 3 /* RFC-1323, window scale option */
|
||||
#define TCP_OPT_SACKOK 4 /* RFC-2018, SACK permitted */
|
||||
#define TCP_OPT_TS 8 /* RFC-1323, Timestamps option */
|
||||
#define TCP_OPT_CCNEW 12 /* RFC-1644, new connection count */
|
||||
|
||||
#endif /* __SERVER__IP__GEN__TCP_HDR_H__ */
|
||||
|
||||
/*
|
||||
* $PchId: tcp_hdr.h,v 1.4 2002/06/10 07:12:22 philip Exp $
|
||||
*/
|
||||
82
include/net/gen/tcp_io.h
Normal file
82
include/net/gen/tcp_io.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
server/ip/gen/tcp_io.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__TCP_IO_H__
|
||||
#define __SERVER__IP__GEN__TCP_IO_H__
|
||||
|
||||
typedef struct nwio_tcpconf
|
||||
{
|
||||
u32_t nwtc_flags;
|
||||
ipaddr_t nwtc_locaddr;
|
||||
ipaddr_t nwtc_remaddr;
|
||||
tcpport_t nwtc_locport;
|
||||
tcpport_t nwtc_remport;
|
||||
} nwio_tcpconf_t;
|
||||
|
||||
#define NWTC_NOFLAGS 0x0000L
|
||||
#define NWTC_ACC_MASK 0x0003L
|
||||
# define NWTC_EXCL 0x00000001L
|
||||
# define NWTC_SHARED 0x00000002L
|
||||
# define NWTC_COPY 0x00000003L
|
||||
#define NWTC_LOCPORT_MASK 0x0030L
|
||||
# define NWTC_LP_UNSET 0x00000010L
|
||||
# define NWTC_LP_SET 0x00000020L
|
||||
# define NWTC_LP_SEL 0x00000030L
|
||||
#define NWTC_REMADDR_MASK 0x0100L
|
||||
# define NWTC_SET_RA 0x00000100L
|
||||
# define NWTC_UNSET_RA 0x01000000L
|
||||
#define NWTC_REMPORT_MASK 0x0200L
|
||||
# define NWTC_SET_RP 0x00000200L
|
||||
# define NWTC_UNSET_RP 0x02000000L
|
||||
|
||||
typedef struct nwio_tcpcl
|
||||
{
|
||||
long nwtcl_flags;
|
||||
long nwtcl_ttl;
|
||||
} nwio_tcpcl_t;
|
||||
|
||||
#define TCF_DEFAULT 0 /* Default parameters */
|
||||
#define TCF_ASYNCH 1 /* Asynchronous connect for non-blocking
|
||||
* socket emulation.
|
||||
*/
|
||||
|
||||
typedef struct nwio_tcpatt
|
||||
{
|
||||
long nwta_flags;
|
||||
} nwio_tcpatt_t;
|
||||
|
||||
typedef struct nwio_tcpopt
|
||||
{
|
||||
u32_t nwto_flags;
|
||||
} nwio_tcpopt_t;
|
||||
|
||||
#define NWTO_NOFLAG 0x0000L
|
||||
#define NWTO_SND_URG_MASK 0x0001L
|
||||
# define NWTO_SND_URG 0x00000001L
|
||||
# define NWTO_SND_NOTURG 0x00010000L
|
||||
#define NWTO_RCV_URG_MASK 0x0002L
|
||||
# define NWTO_RCV_URG 0x00000002L
|
||||
# define NWTO_RCV_NOTURG 0x00020000L
|
||||
#define NWTO_BSD_URG_MASK 0x0004L
|
||||
# define NWTO_BSD_URG 0x00000004L
|
||||
# define NWTO_NOTBSD_URG 0x00040000L
|
||||
#define NWTO_DEL_RST_MASK 0x0008L
|
||||
# define NWTO_DEL_RST 0x00000008L
|
||||
#define NWTO_BULK_MASK 0x0010L
|
||||
# define NWTO_BULK 0x00000010L
|
||||
# define NWTO_NOBULK 0x00100000L
|
||||
|
||||
#define TC_SECRET_SIZE 12
|
||||
|
||||
typedef struct tcp_cookie
|
||||
{
|
||||
u32_t tc_ref;
|
||||
u8_t tc_secret[TC_SECRET_SIZE];
|
||||
} tcp_cookie_t;
|
||||
|
||||
#endif /* __SERVER__IP__GEN__TCP_IO_H__ */
|
||||
|
||||
/*
|
||||
* $PchId: tcp_io.h,v 1.5 2001/02/19 07:36:55 philip Exp $
|
||||
*/
|
||||
13
include/net/gen/udp.h
Normal file
13
include/net/gen/udp.h
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
server/ip/gen/udp.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__UDP_H__
|
||||
#define __SERVER__IP__GEN__UDP_H__
|
||||
|
||||
typedef u16_t udpport_t;
|
||||
|
||||
#define UDP_HDR_SIZE 8
|
||||
#define UDP_IO_HDR_SIZE 16
|
||||
|
||||
#endif /* __SERVER__IP__GEN__UDP_H__ */
|
||||
22
include/net/gen/udp_hdr.h
Normal file
22
include/net/gen/udp_hdr.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
server/ip/gen/udp_hdr.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__UDP_HDR_H__
|
||||
#define __SERVER__IP__GEN__UDP_HDR_H__
|
||||
|
||||
/*
|
||||
* Included for compatibility with programs which assume udp_io_hdr_t to be
|
||||
* defined in this header file
|
||||
*/
|
||||
#include "udp_io_hdr.h"
|
||||
|
||||
typedef struct udp_hdr
|
||||
{
|
||||
udpport_t uh_src_port;
|
||||
udpport_t uh_dst_port;
|
||||
u16_t uh_length;
|
||||
u16_t uh_chksum;
|
||||
} udp_hdr_t;
|
||||
|
||||
#endif /* __SERVER__IP__GEN__UDP_HDR_H__ */
|
||||
45
include/net/gen/udp_io.h
Normal file
45
include/net/gen/udp_io.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
server/ip/gen/udp_io.h
|
||||
*/
|
||||
|
||||
#ifndef __SERVER__IP__GEN__UDP_IO_H__
|
||||
#define __SERVER__IP__GEN__UDP_IO_H__
|
||||
|
||||
typedef struct nwio_udpopt
|
||||
{
|
||||
unsigned long nwuo_flags;
|
||||
udpport_t nwuo_locport;
|
||||
udpport_t nwuo_remport;
|
||||
ipaddr_t nwuo_locaddr;
|
||||
ipaddr_t nwuo_remaddr;
|
||||
} nwio_udpopt_t;
|
||||
|
||||
#define NWUO_NOFLAGS 0x0000L
|
||||
#define NWUO_ACC_MASK 0x0003L
|
||||
#define NWUO_EXCL 0x00000001L
|
||||
#define NWUO_SHARED 0x00000002L
|
||||
#define NWUO_COPY 0x00000003L
|
||||
#define NWUO_LOCPORT_MASK 0x000CL
|
||||
#define NWUO_LP_SEL 0x00000004L
|
||||
#define NWUO_LP_SET 0x00000008L
|
||||
#define NWUO_LP_ANY 0x0000000CL
|
||||
#define NWUO_LOCADDR_MASK 0x0010L
|
||||
#define NWUO_EN_LOC 0x00000010L
|
||||
#define NWUO_DI_LOC 0x00100000L
|
||||
#define NWUO_BROAD_MASK 0x0020L
|
||||
#define NWUO_EN_BROAD 0x00000020L
|
||||
#define NWUO_DI_BROAD 0x00200000L
|
||||
#define NWUO_REMPORT_MASK 0x0100L
|
||||
#define NWUO_RP_SET 0x00000100L
|
||||
#define NWUO_RP_ANY 0x01000000L
|
||||
#define NWUO_REMADDR_MASK 0x0200L
|
||||
#define NWUO_RA_SET 0x00000200L
|
||||
#define NWUO_RA_ANY 0x02000000L
|
||||
#define NWUO_RW_MASK 0x1000L
|
||||
#define NWUO_RWDATONLY 0x00001000L
|
||||
#define NWUO_RWDATALL 0x10000000L
|
||||
#define NWUO_IPOPT_MASK 0x2000L
|
||||
#define NWUO_EN_IPOPT 0x00002000L
|
||||
#define NWUO_DI_IPOPT 0x20000000L
|
||||
|
||||
#endif /* __SERVER__IP__GEN__UDP_IO_H__ */
|
||||
16
include/net/gen/udp_io_hdr.h
Normal file
16
include/net/gen/udp_io_hdr.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef __SERVER__IP__GEN__UDP_IO_HDR_H__
|
||||
#define __SERVER__IP__GEN__UDP_IO_HDR_H__
|
||||
|
||||
|
||||
typedef struct udp_io_hdr
|
||||
{
|
||||
ipaddr_t uih_src_addr;
|
||||
ipaddr_t uih_dst_addr;
|
||||
udpport_t uih_src_port;
|
||||
udpport_t uih_dst_port;
|
||||
u16_t uih_ip_opt_len;
|
||||
u16_t uih_data_len;
|
||||
} udp_io_hdr_t;
|
||||
|
||||
|
||||
#endif /* __SERVER__IP__GEN__UDP_IO_HDR_H__ */
|
||||
85
include/net/gen/vjhc.h
Normal file
85
include/net/gen/vjhc.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
net/gen/vjhc.h
|
||||
|
||||
Defines for Van Jacobson TCP/IP Header Compression as defined in RFC-1144
|
||||
|
||||
Created: Nov 15, 1993 by Philip Homburg <philip@cs.vu.nl>
|
||||
*/
|
||||
|
||||
#ifndef __NET__GEN__VJHC_H__
|
||||
#define __NET__GEN__VJHC_H__
|
||||
|
||||
#define VJHC_FLAG_U 0x01
|
||||
#define VJHC_FLAG_W 0x02
|
||||
#define VJHC_FLAG_A 0x04
|
||||
#define VJHC_FLAG_S 0x08
|
||||
#define VJHC_FLAG_P 0x10
|
||||
#define VJHC_FLAG_I 0x20
|
||||
#define VJHC_FLAG_C 0x40
|
||||
|
||||
#define VJHC_SPEC_I (VJHC_FLAG_S | VJHC_FLAG_W | VJHC_FLAG_U)
|
||||
#define VJHC_SPEC_D (VJHC_FLAG_S | VJHC_FLAG_A | VJHC_FLAG_W | VJHC_FLAG_U)
|
||||
#define VJHC_SPEC_MASK (VJHC_FLAG_S | VJHC_FLAG_A | VJHC_FLAG_W | VJHC_FLAG_U)
|
||||
|
||||
#define VJHC_ENCODE(cp, n) \
|
||||
{ \
|
||||
if ((u16_t)(n) >= 256) \
|
||||
{ \
|
||||
*(cp)++= 0; \
|
||||
*(cp)++= (n >> 8); \
|
||||
*(cp)++= (n); \
|
||||
} \
|
||||
else \
|
||||
*(cp)++= (n); \
|
||||
}
|
||||
|
||||
#define VJHC_ENCODEZ(cp, n) \
|
||||
{ \
|
||||
if ((u16_t)(n) == 0 || (u16_t)(n) >= 256) \
|
||||
{ \
|
||||
*(cp)++= 0; \
|
||||
*(cp)++= (n >> 8); \
|
||||
*(cp)++= (n); \
|
||||
} \
|
||||
else \
|
||||
*(cp)++= (n); \
|
||||
}
|
||||
|
||||
#define VJHC_DECODEL(cp, l) \
|
||||
{ \
|
||||
if (*(cp) == 0) \
|
||||
{ \
|
||||
(l)= htonl(ntohl((l)) + (((cp)[1] << 8) | (cp)[2])); \
|
||||
(cp) += 3; \
|
||||
} \
|
||||
else \
|
||||
(l)= htonl(ntohl((l)) + (u32_t)*(cp)++); \
|
||||
}
|
||||
|
||||
#define VJHC_DECODES(cp, s) \
|
||||
{ \
|
||||
if (*(cp) == 0) \
|
||||
{ \
|
||||
(s)= htons(ntohs((s)) + (((cp)[1] << 8) | (cp)[2])); \
|
||||
(cp) += 3; \
|
||||
} \
|
||||
else \
|
||||
(s)= htons(ntohs((s)) + (u16_t)*(cp)++); \
|
||||
}
|
||||
|
||||
#define VJHC_DECODEU(cp, s) \
|
||||
{ \
|
||||
if (*(cp) == 0) \
|
||||
{ \
|
||||
(s)= htons(((cp)[1] << 8) | (cp)[2]); \
|
||||
(cp) += 3; \
|
||||
} \
|
||||
else \
|
||||
(s)= htons((u16_t)*(cp)++); \
|
||||
}
|
||||
|
||||
#endif /* __NET__GEN__VJHC_H__ */
|
||||
|
||||
/*
|
||||
* $PchId: vjhc.h,v 1.2 1995/11/17 22:14:46 philip Exp $
|
||||
*/
|
||||
@@ -1,82 +1,5 @@
|
||||
/*
|
||||
The following macro definitions convert to and from the network standard byte
|
||||
order. The macros with their name in lower case guarantee to evaluate their
|
||||
argument exactly once. The function of the macros is encoded in their names;
|
||||
htons means convert a (unsigned) short in host byte order to network byte order.
|
||||
*/
|
||||
|
||||
#ifndef _NET__HTON_H
|
||||
#define _NET__HTON_H
|
||||
|
||||
#include <minix/sys_config.h>
|
||||
|
||||
extern u16_t _tmp;
|
||||
extern u32_t _tmp_l;
|
||||
|
||||
/* Find out about the byte order. */
|
||||
|
||||
/* assume <minix/config.h> is included, let's check */
|
||||
#if (_MINIX_CHIP == 0)
|
||||
#include "_MINIX_CHIP macro not set, include <minix/config.h>"
|
||||
#endif
|
||||
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#define LITTLE_ENDIAN 1
|
||||
#endif
|
||||
|
||||
#if (_MINIX_CHIP == _CHIP_M68000 || _MINIX_CHIP == _CHIP_SPARC)
|
||||
#define BIG_ENDIAN 1
|
||||
#endif
|
||||
|
||||
#if (LITTLE_ENDIAN) && (BIG_ENDIAN)
|
||||
#include "both LITTLE_ENDIAN and BIG_ENDIAN are defined"
|
||||
/* LITTLE_ENDIAN and BIG_ENDIAN are both defined */
|
||||
#endif
|
||||
|
||||
#if !(LITTLE_ENDIAN) && !(BIG_ENDIAN)
|
||||
#include "neither LITTLE_ENDIAN nor BIG_ENDIAN is defined"
|
||||
/* LITTLE_ENDIAN and BIG_ENDIAN are both NOT defined */
|
||||
#endif
|
||||
|
||||
#if LITTLE_ENDIAN
|
||||
#define HTONS(x) ( ( (((unsigned short)(x)) >>8) & 0xff) | \
|
||||
((((unsigned short)(x)) & 0xff)<<8) )
|
||||
#define NTOHS(x) ( ( (((unsigned short)(x)) >>8) & 0xff) | \
|
||||
((((unsigned short)(x)) & 0xff)<<8) )
|
||||
#define HTONL(x) ((((x)>>24) & 0xffL) | (((x)>>8) & 0xff00L) | \
|
||||
(((x)<<8) & 0xff0000L) | (((x)<<24) & 0xff000000L))
|
||||
#define NTOHL(x) ((((x)>>24) & 0xffL) | (((x)>>8) & 0xff00L) | \
|
||||
(((x)<<8) & 0xff0000L) | (((x)<<24) & 0xff000000L))
|
||||
|
||||
#if _WORD_SIZE > 2
|
||||
#define htons(x) (_tmp=(x), ((_tmp>>8) & 0xff) | ((_tmp<<8) & 0xff00))
|
||||
#define ntohs(x) (_tmp=(x), ((_tmp>>8) & 0xff) | ((_tmp<<8) & 0xff00))
|
||||
#define htonl(x) (_tmp_l=(x), ((_tmp_l>>24) & 0xffL) | \
|
||||
((_tmp_l>>8) & 0xff00L) | \
|
||||
((_tmp_l<<8) & 0xff0000L) | ((_tmp_l<<24) & 0xff000000L))
|
||||
#define ntohl(x) (_tmp_l=(x), ((_tmp_l>>24) & 0xffL) \
|
||||
| ((_tmp_l>>8) & 0xff00L) | \
|
||||
((_tmp_l<<8) & 0xff0000L) | ((_tmp_l<<24) & 0xff000000L))
|
||||
|
||||
#else /* _WORD_SIZE == 2 */
|
||||
/* The above macros are too unwieldy for a 16-bit machine. */
|
||||
u16_t htons(u16_t x);
|
||||
u16_t ntohs(u16_t x);
|
||||
u32_t htonl(u32_t x);
|
||||
u32_t ntohl(u32_t x);
|
||||
#endif /* _WORD_SIZE == 2 */
|
||||
|
||||
#endif /* LITTLE_ENDIAN */
|
||||
|
||||
#if BIG_ENDIAN
|
||||
#define htons(x) (x)
|
||||
#define HTONS(x) (x)
|
||||
#define ntohs(x) (x)
|
||||
#define NTOHS(x) (x)
|
||||
#define htonl(x) (x)
|
||||
#define HTONL(x) (x)
|
||||
#define ntohl(x) (x)
|
||||
#define NTOHL(x) (x)
|
||||
#endif /* BIG_ENDIAN */
|
||||
|
||||
#endif /* _NET__HTON_H */
|
||||
* Dummy file for Minix old includes compatibility.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/endian.h>
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/*
|
||||
net/if.h
|
||||
*/
|
||||
#ifndef _NET_IF_H_
|
||||
#define _NET_IF_H_
|
||||
|
||||
#define IFF_UP 0x0001 /* interface is up */
|
||||
|
||||
#endif /* _NET_IF_H_ */
|
||||
|
||||
109
include/net/if_ether.h
Normal file
109
include/net/if_ether.h
Normal file
@@ -0,0 +1,109 @@
|
||||
/* $NetBSD: if_ether.h,v 1.58 2010/05/19 20:41:59 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)if_ether.h 8.1 (Berkeley) 6/10/93
|
||||
*/
|
||||
|
||||
#ifndef _NET_IF_ETHER_H_
|
||||
#define _NET_IF_ETHER_H_
|
||||
|
||||
/*
|
||||
* Some basic Ethernet constants.
|
||||
*/
|
||||
#define ETHER_ADDR_LEN 6 /* length of an Ethernet address */
|
||||
#define ETHER_TYPE_LEN 2 /* length of the Ethernet type field */
|
||||
#define ETHER_CRC_LEN 4 /* length of the Ethernet CRC */
|
||||
#define ETHER_HDR_LEN ((ETHER_ADDR_LEN * 2) + ETHER_TYPE_LEN)
|
||||
#define ETHER_MIN_LEN 64 /* minimum frame length, including CRC */
|
||||
#define ETHER_MAX_LEN 1518 /* maximum frame length, including CRC */
|
||||
#define ETHER_MAX_LEN_JUMBO 9018 /* maximum jumbo frame len, including CRC */
|
||||
|
||||
/*
|
||||
* Some Ethernet extensions.
|
||||
*/
|
||||
#define ETHER_VLAN_ENCAP_LEN 4 /* length of 802.1Q VLAN encapsulation */
|
||||
#define ETHER_PPPOE_ENCAP_LEN 8 /* length of PPPoE encapsulation */
|
||||
|
||||
/*
|
||||
* Ethernet address - 6 octets
|
||||
* this is only used by the ethers(3) functions.
|
||||
*/
|
||||
struct ether_addr {
|
||||
uint8_t ether_addr_octet[ETHER_ADDR_LEN];
|
||||
} __packed;
|
||||
|
||||
/*
|
||||
* Structure of a 10Mb/s Ethernet header.
|
||||
*/
|
||||
struct ether_header {
|
||||
uint8_t ether_dhost[ETHER_ADDR_LEN];
|
||||
uint8_t ether_shost[ETHER_ADDR_LEN];
|
||||
uint16_t ether_type;
|
||||
} __packed;
|
||||
|
||||
#include <net/ethertypes.h>
|
||||
|
||||
#define ETHER_IS_MULTICAST(addr) (*(addr) & 0x01) /* is address mcast/bcast? */
|
||||
#define ETHER_IS_LOCAL(addr) (*(addr) & 0x02) /* is address local? */
|
||||
|
||||
#define ETHERMTU_JUMBO (ETHER_MAX_LEN_JUMBO - ETHER_HDR_LEN - ETHER_CRC_LEN)
|
||||
#define ETHERMTU (ETHER_MAX_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN)
|
||||
#define ETHERMIN (ETHER_MIN_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN)
|
||||
|
||||
/*
|
||||
* Compute the maximum frame size based on ethertype (i.e. possible
|
||||
* encapsulation) and whether or not an FCS is present.
|
||||
*/
|
||||
#define ETHER_MAX_FRAME(ifp, etype, hasfcs) \
|
||||
((ifp)->if_mtu + ETHER_HDR_LEN + \
|
||||
((hasfcs) ? ETHER_CRC_LEN : 0) + \
|
||||
(((etype) == ETHERTYPE_VLAN) ? ETHER_VLAN_ENCAP_LEN : 0) + \
|
||||
(((etype) == ETHERTYPE_PPPOE) ? ETHER_PPPOE_ENCAP_LEN : 0))
|
||||
|
||||
/*
|
||||
* Ethernet CRC32 polynomials (big- and little-endian verions).
|
||||
*/
|
||||
#define ETHER_CRC_POLY_LE 0xedb88320
|
||||
#define ETHER_CRC_POLY_BE 0x04c11db6
|
||||
|
||||
/*
|
||||
* Prototype ethers(3) functions.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
char * ether_ntoa(const struct ether_addr *);
|
||||
struct ether_addr *
|
||||
ether_aton(const char *);
|
||||
int ether_ntohost(char *, const struct ether_addr *);
|
||||
int ether_hostton(const char *, struct ether_addr *);
|
||||
int ether_line(const char *, struct ether_addr *, char *);
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_NET_IF_ETHER_H_ */
|
||||
@@ -1,98 +0,0 @@
|
||||
/* net/ioctl.h - Network ioctl() command codes. Author: Kees J. Bot
|
||||
* 23 Nov 2002
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NET__IOCTL_H
|
||||
#define _NET__IOCTL_H
|
||||
|
||||
#include <minix/ioctl.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
#ifndef _SOCKLEN_T
|
||||
#define _SOCKLEN_T
|
||||
typedef int32_t socklen_t;
|
||||
#endif /* _SOCKLEN_T */
|
||||
|
||||
#define MSG_CONTROL_MAX (1024 - sizeof(socklen_t))
|
||||
struct msg_control
|
||||
{
|
||||
char msg_control[MSG_CONTROL_MAX];
|
||||
socklen_t msg_controllen;
|
||||
};
|
||||
|
||||
|
||||
/* Network ioctls. */
|
||||
#define NWIOSETHOPT _IOW('n', 16, struct nwio_ethopt)
|
||||
#define NWIOGETHOPT _IOR('n', 17, struct nwio_ethopt)
|
||||
#define NWIOGETHSTAT _IOR('n', 18, struct nwio_ethstat)
|
||||
|
||||
#define NWIOARPGIP _IORW('n',20, struct nwio_arp)
|
||||
#define NWIOARPGNEXT _IORW('n',21, struct nwio_arp)
|
||||
#define NWIOARPSIP _IOW ('n',22, struct nwio_arp)
|
||||
#define NWIOARPDIP _IOW ('n',23, struct nwio_arp)
|
||||
|
||||
#define NWIOSIPCONF2 _IOW('n', 32, struct nwio_ipconf2)
|
||||
#define NWIOSIPCONF _IOW('n', 32, struct nwio_ipconf)
|
||||
#define NWIOGIPCONF2 _IOR('n', 33, struct nwio_ipconf2)
|
||||
#define NWIOGIPCONF _IOR('n', 33, struct nwio_ipconf)
|
||||
#define NWIOSIPOPT _IOW('n', 34, struct nwio_ipopt)
|
||||
#define NWIOGIPOPT _IOR('n', 35, struct nwio_ipopt)
|
||||
|
||||
#define NWIOGIPOROUTE _IORW('n', 40, struct nwio_route)
|
||||
#define NWIOSIPOROUTE _IOW ('n', 41, struct nwio_route)
|
||||
#define NWIODIPOROUTE _IOW ('n', 42, struct nwio_route)
|
||||
#define NWIOGIPIROUTE _IORW('n', 43, struct nwio_route)
|
||||
#define NWIOSIPIROUTE _IOW ('n', 44, struct nwio_route)
|
||||
#define NWIODIPIROUTE _IOW ('n', 45, struct nwio_route)
|
||||
|
||||
#define NWIOSTCPCONF _IOW('n', 48, struct nwio_tcpconf)
|
||||
#define NWIOGTCPCONF _IOR('n', 49, struct nwio_tcpconf)
|
||||
#define NWIOTCPCONN _IOW('n', 50, struct nwio_tcpcl)
|
||||
#define NWIOTCPLISTEN _IOW('n', 51, struct nwio_tcpcl)
|
||||
#define NWIOTCPATTACH _IOW('n', 52, struct nwio_tcpatt)
|
||||
#define NWIOTCPSHUTDOWN _IO ('n', 53)
|
||||
#define NWIOSTCPOPT _IOW('n', 54, struct nwio_tcpopt)
|
||||
#define NWIOGTCPOPT _IOR('n', 55, struct nwio_tcpopt)
|
||||
#define NWIOTCPPUSH _IO ('n', 56)
|
||||
#define NWIOTCPLISTENQ _IOW('n', 57, int)
|
||||
#define NWIOGTCPCOOKIE _IOR('n', 58, struct tcp_cookie)
|
||||
#define NWIOTCPACCEPTTO _IOW('n', 59, struct tcp_cookie)
|
||||
#define NWIOTCPGERROR _IOR('n', 60, int)
|
||||
|
||||
#define NWIOSUDPOPT _IOW('n', 64, struct nwio_udpopt)
|
||||
#define NWIOGUDPOPT _IOR('n', 65, struct nwio_udpopt)
|
||||
#define NWIOUDPPEEK _IOR('n', 66, struct udp_io_hdr)
|
||||
|
||||
#define NWIOGUDSFADDR _IOR ('n', 67, struct sockaddr_un) /* recvfrom() */
|
||||
#define NWIOSUDSTADDR _IOW ('n', 68, struct sockaddr_un) /* sendto() */
|
||||
#define NWIOSUDSADDR _IOW ('n', 69, struct sockaddr_un) /* bind() */
|
||||
#define NWIOGUDSADDR _IOR ('n', 70, struct sockaddr_un) /* getsockname() */
|
||||
#define NWIOGUDSPADDR _IOR ('n', 71, struct sockaddr_un) /* getpeername() */
|
||||
#define NWIOSUDSTYPE _IOW ('n', 72, int) /* socket() */
|
||||
#define NWIOSUDSBLOG _IOW ('n', 73, int) /* listen() */
|
||||
#define NWIOSUDSCONN _IOW ('n', 74, struct sockaddr_un) /* connect() */
|
||||
#define NWIOSUDSSHUT _IOW ('n', 75, int) /* shutdown() */
|
||||
#define NWIOSUDSPAIROLD _IOW ('n', 76, short) /* socketpair() */
|
||||
#define NWIOSUDSPAIR _IOW ('n', 76, dev_t) /* socketpair() */
|
||||
#define NWIOSUDSACCEPT _IOW ('n', 77, struct sockaddr_un) /* accept() */
|
||||
#define NWIOSUDSCTRL _IOW ('n', 78, struct msg_control) /* sendmsg() */
|
||||
#define NWIOGUDSCTRL _IORW('n', 79, struct msg_control) /* recvmsg() */
|
||||
|
||||
#define NWIOSPSIPOPT _IOW('n', 80, struct nwio_psipopt)
|
||||
#define NWIOGPSIPOPT _IOR('n', 81, struct nwio_psipopt)
|
||||
|
||||
/* setsockopt/setsockopt for unix domain sockets */
|
||||
#define NWIOGUDSSOTYPE _IOR('n', 90, int) /* SO_TYPE */
|
||||
#define NWIOGUDSPEERCREDOLD _IOR('n', 91, struct ucred_old) /* SO_PEERCRED */
|
||||
#define NWIOGUDSPEERCRED _IOR('n', 91, struct ucred) /* SO_PEERCRED */
|
||||
#define NWIOGUDSSNDBUF _IOR('n', 92, size_t) /* SO_SNDBUF */
|
||||
#define NWIOSUDSSNDBUF _IOW('n', 93, size_t) /* SO_SNDBUF */
|
||||
#define NWIOGUDSRCVBUF _IOR('n', 94, size_t) /* SO_RCVBUF */
|
||||
#define NWIOSUDSRCVBUF _IOW('n', 95, size_t) /* SO_RCVBUF */
|
||||
|
||||
#endif /* _NET__IOCTL_H */
|
||||
|
||||
/*
|
||||
* $PchId: ioctl.h,v 1.2 2003/07/25 14:34:03 philip Exp $
|
||||
*/
|
||||
@@ -5,15 +5,6 @@ net/netlib.h
|
||||
#ifndef _NET__NETLIB_H_
|
||||
#define _NET__NETLIB_H_
|
||||
|
||||
#ifndef _ANSI
|
||||
#include <minix/ansi.h>
|
||||
#endif
|
||||
|
||||
_PROTOTYPE (int iruserok, (unsigned long raddr, int superuser,
|
||||
const char *ruser, const char *luser) );
|
||||
_PROTOTYPE (int rcmd, (char **ahost, int rport, const char *locuser,
|
||||
const char *remuser, const char *cmd, int *fd2p) );
|
||||
|
||||
#define IPSTAT_DEVICE "/dev/ipstat"
|
||||
#define ETH_DEVICE "/dev/eth"
|
||||
#define IP_DEVICE "/dev/ip"
|
||||
|
||||
Reference in New Issue
Block a user