184 lines
5.5 KiB
C
184 lines
5.5 KiB
C
/***************************************************************************
|
|
*
|
|
* File Name: ./hprrm/sxif.h
|
|
*
|
|
* Copyright (C) 1993-1996 Hewlett-Packard Company.
|
|
* All rights reserved.
|
|
*
|
|
* 11311 Chinden Blvd.
|
|
* Boise, Idaho 83714
|
|
*
|
|
* This is a part of the HP JetAdmin Printer Utility
|
|
*
|
|
* This source code is only intended as a supplement for support and
|
|
* localization of HP JetAdmin by 3rd party Operating System vendors.
|
|
* Modification of source code cannot be made without the express written
|
|
* consent of Hewlett-Packard.
|
|
*
|
|
*
|
|
* Description:
|
|
*
|
|
* Author: Name
|
|
*
|
|
*
|
|
* Modification history:
|
|
*
|
|
* date initials change description
|
|
*
|
|
* mm-dd-yy MJB
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
***************************************************************************/
|
|
|
|
#ifndef _RPC_SYS_IF_INCLUDED
|
|
#define _RPC_SYS_IF_INCLUDED
|
|
|
|
#include "nfsdefs.h"
|
|
#include "sxtyps.h"
|
|
#include "winhack.h"
|
|
/*
|
|
* .unsupp/sys/_ became sxu
|
|
* machine/ became sxm
|
|
* sys/ became sx
|
|
* arpa/ became sx
|
|
* netinet/ became sx
|
|
* net/ became sx
|
|
* rpc/ became
|
|
* auth_ became aut
|
|
* auth became aut
|
|
* clnt_ became clnt
|
|
* nfsv3_ became nfs
|
|
* nfsv3 became nfs
|
|
* getrpc became gr
|
|
* pmap_ became pmap
|
|
* rpc_ became rpc
|
|
* svc_ became svc
|
|
* unix_ became ux
|
|
* unix became ux
|
|
* xdr_ became xdr
|
|
* reference became rf
|
|
* commondata became cd
|
|
* tablesize became tsz
|
|
* get_myaddress became gmyad
|
|
* bindresvport became brvp
|
|
* generic became gnc
|
|
* getmaps became map
|
|
* getport became port
|
|
* _prot became pro
|
|
* prot became pro
|
|
* simple became simp
|
|
* callmsg became call
|
|
* error became err
|
|
* stdsyms became syms
|
|
* socket became sock
|
|
* sysmacros became macs
|
|
* if_arp became ifarp
|
|
* errno became ern
|
|
* ioctl became ioct
|
|
* signal became sig
|
|
* param became parm
|
|
* types became typs
|
|
*/
|
|
/* $Header: sxif.h,v 1.10 95/02/10 14:33:20 dbm Exp $ */
|
|
|
|
/*
|
|
* Copyright (c) 1982, 1986 Regents of the University of California.
|
|
* All rights reserved.
|
|
*
|
|
* Redistribution and use in source and binary forms are permitted
|
|
* provided that the above copyright notice and this paragraph are
|
|
* duplicated in all such forms and that any documentation,
|
|
* advertising materials, and other materials related to such
|
|
* distribution and use acknowledge that the software was developed
|
|
* by the University of California, Berkeley. The name of the
|
|
* University may not 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 MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
*
|
|
* @(#)if.h 7.3 (Berkeley) 6/27/88 plus MULTICAST 1.1
|
|
*/
|
|
|
|
/*
|
|
* Structures defining a network interface, providing a packet
|
|
* transport mechanism (ala level 0 of the PUP protocols).
|
|
*
|
|
* Each interface accepts output datagrams of a specified maximum
|
|
* length, and provides higher level routines with input datagrams
|
|
* received from its medium.
|
|
*
|
|
* Output occurs when the routine if_output is called, with three parameters:
|
|
* (*ifp->if_output)(ifp, m, dst)
|
|
* Here m is the mbuf chain to be sent and dst is the destination address.
|
|
* The output routine encapsulates the supplied datagram if necessary,
|
|
* and then transmits it on its medium.
|
|
*
|
|
* On input, each interface unwraps the data received by it, and either
|
|
* places it on the input queue of a internetwork datagram routine
|
|
* and posts the associated software interrupt, or passes the datagram to a raw
|
|
* packet input routine.
|
|
*
|
|
* Routines exist for locating interfaces by their addresses
|
|
* or for locating a interface on a certain network, as well as more general
|
|
* routing and gateway routines maintaining information used to locate
|
|
* interfaces. These routines live in the files if.c and route.c
|
|
*/
|
|
|
|
/*
|
|
* Structure defining a queue for a network interface.
|
|
*
|
|
* (Would like to call this struct ``if'', but C isn't PL/1.)
|
|
*/
|
|
|
|
#define IFF_UP 0x1 /* interface is up */
|
|
#define IFF_BROADCAST 0x2 /* broadcast address valid */
|
|
|
|
/*
|
|
* Interface request structure used for socket
|
|
* ioctl's. All interface ioctl's must have parameter
|
|
* definitions which begin with ifr_name. The
|
|
* remainder may be interface specific.
|
|
*/
|
|
struct ifreq {
|
|
#define IFNAMSIZ 16
|
|
char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
|
|
union {
|
|
struct sockaddr ifru_addr;
|
|
struct sockaddr ifru_dstaddr;
|
|
struct sockaddr ifru_broadaddr;
|
|
short ifru_flags;
|
|
int ifru_metric;
|
|
caddr_t ifru_data;
|
|
} 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_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
|
|
#define ifr_flags ifr_ifru.ifru_flags /* flags */
|
|
#define ifr_metric ifr_ifru.ifru_metric /* metric */
|
|
#define ifr_data ifr_ifru.ifru_data /* for use by interface */
|
|
};
|
|
|
|
/*
|
|
* 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 */
|
|
};
|
|
|
|
#endif /* _RPC_SYS_IF_INCLUDED */
|
|
|