xref: /titanic_51/usr/src/lib/libbc/inc/include/sys/sockio.h (revision 5d54f3d8999eac1762fe0a8c7177d20f1f201fae)
17c478bd9Sstevel@tonic-gate /*
2*5d54f3d8Smuffin  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
37c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
47c478bd9Sstevel@tonic-gate  */
57c478bd9Sstevel@tonic-gate 
67c478bd9Sstevel@tonic-gate /*
77c478bd9Sstevel@tonic-gate  * Copyright (c) 1982, 1986 Regents of the University of California.
87c478bd9Sstevel@tonic-gate  * All rights reserved.  The Berkeley software License Agreement
97c478bd9Sstevel@tonic-gate  * specifies the terms and conditions for redistribution.
107c478bd9Sstevel@tonic-gate  */
117c478bd9Sstevel@tonic-gate 
12*5d54f3d8Smuffin #ifndef _sys_sockio_h
13*5d54f3d8Smuffin #define	_sys_sockio_h
14*5d54f3d8Smuffin 
157c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
167c478bd9Sstevel@tonic-gate 
177c478bd9Sstevel@tonic-gate /*
187c478bd9Sstevel@tonic-gate  * General socket ioctl definitions.
197c478bd9Sstevel@tonic-gate  */
207c478bd9Sstevel@tonic-gate 
217c478bd9Sstevel@tonic-gate #include <sys/ioccom.h>
227c478bd9Sstevel@tonic-gate 
237c478bd9Sstevel@tonic-gate /* socket i/o controls */
24*5d54f3d8Smuffin #define	SIOCSHIWAT	_IOW('s',  0, int)		/* set high watermark */
25*5d54f3d8Smuffin #define	SIOCGHIWAT	_IOR('s',  1, int)		/* get high watermark */
26*5d54f3d8Smuffin #define	SIOCSLOWAT	_IOW('s',  2, int)		/* set low watermark */
27*5d54f3d8Smuffin #define	SIOCGLOWAT	_IOR('s',  3, int)		/* get low watermark */
28*5d54f3d8Smuffin #define	SIOCATMARK	_IOR('s',  7, int)		/* at oob mark? */
29*5d54f3d8Smuffin #define	SIOCSPGRP	_IOW('s',  8, int)		/* set process group */
30*5d54f3d8Smuffin #define	SIOCGPGRP	_IOR('s',  9, int)		/* get process group */
317c478bd9Sstevel@tonic-gate 
32*5d54f3d8Smuffin #define	SIOCADDRT	_IOW('r', 10, struct rtentry)	/* add route */
33*5d54f3d8Smuffin #define	SIOCDELRT	_IOW('r', 11, struct rtentry)	/* delete route */
347c478bd9Sstevel@tonic-gate 
35*5d54f3d8Smuffin #define	SIOCSIFADDR	_IOW('i', 12, struct ifreq)	/* set ifnet address */
36*5d54f3d8Smuffin #define	SIOCGIFADDR	_IOWR('i',13, struct ifreq)	/* get ifnet address */
37*5d54f3d8Smuffin #define	SIOCSIFDSTADDR	_IOW('i', 14, struct ifreq)	/* set p-p address */
38*5d54f3d8Smuffin #define	SIOCGIFDSTADDR	_IOWR('i',15, struct ifreq)	/* get p-p address */
39*5d54f3d8Smuffin #define	SIOCSIFFLAGS	_IOW('i', 16, struct ifreq)	/* set ifnet flags */
40*5d54f3d8Smuffin #define	SIOCGIFFLAGS	_IOWR('i',17, struct ifreq)	/* get ifnet flags */
41*5d54f3d8Smuffin #define	SIOCSIFMEM	_IOW('i', 18, struct ifreq)	/* set interface mem */
42*5d54f3d8Smuffin #define	SIOCGIFMEM	_IOWR('i',19, struct ifreq)	/* get interface mem */
43*5d54f3d8Smuffin #define	SIOCGIFCONF	_IOWR('i',20, struct ifconf)	/* get ifnet list */
44*5d54f3d8Smuffin #define	SIOCSIFMTU	_IOW('i', 21, struct ifreq)	/* set if_mtu */
45*5d54f3d8Smuffin #define	SIOCGIFMTU	_IOWR('i',22, struct ifreq)	/* get if_mtu */
467c478bd9Sstevel@tonic-gate 
477c478bd9Sstevel@tonic-gate 	/* from 4.3BSD */
48*5d54f3d8Smuffin #define	SIOCGIFBRDADDR	_IOWR('i',23, struct ifreq)	/* get broadcast addr */
49*5d54f3d8Smuffin #define	SIOCSIFBRDADDR	_IOW('i',24, struct ifreq)	/* set broadcast addr */
50*5d54f3d8Smuffin #define	SIOCGIFNETMASK	_IOWR('i',25, struct ifreq)	/* get net addr mask */
51*5d54f3d8Smuffin #define	SIOCSIFNETMASK	_IOW('i',26, struct ifreq)	/* set net addr mask */
52*5d54f3d8Smuffin #define	SIOCGIFMETRIC	_IOWR('i',27, struct ifreq)	/* get IF metric */
53*5d54f3d8Smuffin #define	SIOCSIFMETRIC	_IOW('i',28, struct ifreq)	/* set IF metric */
547c478bd9Sstevel@tonic-gate 
55*5d54f3d8Smuffin #define	SIOCSARP	_IOW('i', 30, struct arpreq)	/* set arp entry */
56*5d54f3d8Smuffin #define	SIOCGARP	_IOWR('i',31, struct arpreq)	/* get arp entry */
57*5d54f3d8Smuffin #define	SIOCDARP	_IOW('i', 32, struct arpreq)	/* delete arp entry */
58*5d54f3d8Smuffin #define	SIOCUPPER       _IOW('i', 40, struct ifreq)       /* attach upper layer */
59*5d54f3d8Smuffin #define	SIOCLOWER       _IOW('i', 41, struct ifreq)       /* attach lower layer */
60*5d54f3d8Smuffin #define	SIOCSETSYNC	_IOW('i',  44, struct ifreq)	/* set syncmode */
61*5d54f3d8Smuffin #define	SIOCGETSYNC	_IOWR('i', 45, struct ifreq)	/* get syncmode */
62*5d54f3d8Smuffin #define	SIOCSSDSTATS	_IOWR('i', 46, struct ifreq)	/* sync data stats */
63*5d54f3d8Smuffin #define	SIOCSSESTATS	_IOWR('i', 47, struct ifreq)	/* sync error stats */
647c478bd9Sstevel@tonic-gate 
65*5d54f3d8Smuffin #define	SIOCSPROMISC	_IOW('i', 48, int)		/* request promisc mode
667c478bd9Sstevel@tonic-gate 							   on/off */
67*5d54f3d8Smuffin #define	SIOCADDMULTI	_IOW('i', 49, struct ifreq)	/* set m/c address */
68*5d54f3d8Smuffin #define	SIOCDELMULTI	_IOW('i', 50, struct ifreq)	/* clr m/c address */
697c478bd9Sstevel@tonic-gate 
707c478bd9Sstevel@tonic-gate /* FDDI controls */
71*5d54f3d8Smuffin #define SIOCFDRESET	_IOW('i', 51, struct ifreq)	/* Reset FDDI */
72*5d54f3d8Smuffin #define SIOCFDSLEEP	_IOW('i', 52, struct ifreq)	/* Sleep until next dnld req */
73*5d54f3d8Smuffin #define SIOCSTRTFMWAR	_IOW('i', 53, struct ifreq)	/* Start FW at an addr */
74*5d54f3d8Smuffin #define SIOCLDNSTRTFW	_IOW('i', 54, struct ifreq)	/* Load the shared memory */
75*5d54f3d8Smuffin #define SIOCGETFDSTAT	_IOW('i', 55, struct ifreq)	/* Get FDDI stats */
76*5d54f3d8Smuffin #define SIOCFDNMIINT	_IOW('i', 56, struct ifreq)        /* NMI to fddi */
77*5d54f3d8Smuffin #define SIOCFDEXUSER	_IOW('i', 57, struct ifreq)        /* Exec in user mode */
78*5d54f3d8Smuffin #define SIOCFDGNETMAP	_IOW('i', 58, struct ifreq)        /* Get a netmap entry */
79*5d54f3d8Smuffin #define SIOCFDGIOCTL    _IOW('i', 59, struct ifreq)	 /* Generic ioctl for fddi */
807c478bd9Sstevel@tonic-gate 
817c478bd9Sstevel@tonic-gate /* protocol i/o controls */
82*5d54f3d8Smuffin #define	SIOCSNIT	_IOW('p',  0, struct nit_ioc)	/* set nit modes */
83*5d54f3d8Smuffin #define	SIOCGNIT	_IOWR('p', 1, struct nit_ioc)	/* get nit modes */
847c478bd9Sstevel@tonic-gate 
857c478bd9Sstevel@tonic-gate #endif /* !_sys_sockio_h */
86