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