1: /*
   2:  * Copyright (c) 1988 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	net_mac.h 2.0 (2.11BSD) 1997/2/14
   7:  */
   8: 
   9: struct socket *asoqremque();
  10: #define ASOQREMQUE(so, n) \
  11:     KScall(asoqremque, sizeof(struct socket *) + sizeof(int), so, n)
  12: 
  13: int b_to_q();
  14: #define B_TO_Q(cp, cc, q) \
  15:     SKcall(b_to_q, sizeof(char *) + sizeof(int) + sizeof(struct clist *), \
  16:         cp, cc, q)
  17: 
  18: int connwhile();
  19: #define CONNWHILE(so) \
  20:     KScall(connwhile, sizeof(struct socket *), so)
  21: 
  22: memaddr malloc();
  23: #define MALLOC(map, size) \
  24:     (memaddr)SKcall(malloc, sizeof(struct map *) + sizeof(u_int), \
  25:         map, size)
  26: 
  27: int fpfetch();
  28: #define FPFETCH(fp, fpp) \
  29:     SKcall(fpfetch, sizeof(struct file *) + sizeof(struct file *), \
  30:         fp, fpp)
  31: 
  32: void fpflags();
  33: #define FPFLAGS(fp, set, clear) \
  34:     SKcall(fpflags, sizeof(struct file *) + sizeof(int) + \
  35:         sizeof(int), fp, set, clear)
  36: 
  37: int gsignal();
  38: #define GSIGNAL(pgrp, sig) \
  39:     SKcall(gsignal, sizeof(int) + sizeof(int), pgrp, sig)
  40: 
  41: struct mbuf *m_free();
  42: #define M_FREE(m) \
  43:     KScall(m_free, sizeof(struct mbuf *), m)
  44: 
  45: int m_freem();
  46: #define M_FREEM(m) \
  47:     KScall(m_freem, sizeof(struct mbuf *), m)
  48: 
  49: int netcopyout();
  50: #define NETCOPYOUT(from, to, len) \
  51:     KScall(netcopyout, sizeof(struct mbuf *) + sizeof(char *) + \
  52:         sizeof(u_int), from, to, len)
  53: 
  54: int netcrash();
  55: #define NETCRASH() \
  56:     SKcall(netcrash, 0)
  57: 
  58: int iput();
  59: #define IPUT(ip) \
  60:     SKcall(iput, sizeof(struct inode *), ip)
  61: 
  62: struct proc *netpfind();
  63: #define NETPFIND(pid) \
  64:     SKcall(netpfind, sizeof(int), pid)
  65: 
  66: int netpsignal();
  67: #define NETPSIGNAL(p, sig) \
  68:     SKcall(netpsignal, sizeof(struct proc *) + sizeof(int), p, sig)
  69: 
  70: void netsethz();
  71: #define NETSETHZ() \
  72:     KScall(netsethz, sizeof (hz), hz)
  73: 
  74: int netstart();
  75: #define NETSTART() \
  76:     KScall(netstart, 0)
  77: 
  78: int putc();
  79: #define PUTC(c, p) \
  80:     SKcall(putc, sizeof(int) + sizeof(struct clist *), c, p)
  81: 
  82: int selwakeup();
  83: #define SELWAKEUP(p, coll) \
  84:     SKcall(selwakeup, sizeof(struct proc *) + sizeof(long), p, coll)
  85: 
  86: int sleep();
  87: #define SLEEP(chan, pri) \
  88:     SKcall(sleep, sizeof(caddr_t) + sizeof(int), SUPERADD(chan), pri)
  89: 
  90: int soacc1();
  91: #define SOACC1(so) \
  92:     KScall(soacc1, sizeof(struct socket *), so)
  93: 
  94: int soaccept();
  95: #define SOACCEPT(so, nam) \
  96:     KScall(soaccept, sizeof(struct socket *) + sizeof(struct mbuf *), \
  97:         so, nam)
  98: 
  99: int sobind();
 100: #define SOBIND(so, nam) \
 101:     KScall(sobind, sizeof(struct socket *) + sizeof(struct mbuf *), \
 102:         so, nam)
 103: 
 104: int soclose();
 105: #define SOCLOSE(so) \
 106:     KScall(soclose, sizeof(struct socket *), so)
 107: 
 108: int soconnect();
 109: #define SOCON1(so, nam) \
 110:     KScall(soconnect, sizeof(struct socket *) + \
 111:         sizeof(struct mbuf *), so, nam)
 112: 
 113: int soconnect2();
 114: #define SOCON2(so1, so2) \
 115:     KScall(soconnect2, sizeof(struct socket *) + \
 116:         sizeof(struct socket *), so1, so2)
 117: 
 118: int socreate();
 119: #define SOCREATE(dom, aso, type, proto) \
 120:     KScall(socreate, sizeof(int) + sizeof(struct socket **) + \
 121:         sizeof(int) + sizeof(int), dom, aso, type, proto)
 122: 
 123: int sogetnam();
 124: #define SOGETNAM(so, m) \
 125:     KScall(sogetnam, sizeof(struct socket *) + sizeof(struct mbuf *), \
 126:         so, m)
 127: 
 128: int sogetopt();
 129: #define SOGETOPT(so, level, optname, mp) \
 130:     KScall(sogetopt, sizeof(struct socket *) + sizeof(int) + \
 131:         sizeof(int) + sizeof(struct mbuf **), so, level, optname, mp)
 132: 
 133: int sogetpeer();
 134: #define SOGETPEER(so, m) \
 135:     KScall(sogetpeer, sizeof(struct socket *) + sizeof(struct mbuf *), \
 136:         so, m)
 137: 
 138: int solisten();
 139: #define SOLISTEN(so, backlog) \
 140:     KScall(solisten, sizeof(struct socket *) + sizeof(int), so, backlog)
 141: 
 142: /* note; pass pointer to a socket, not pointer to file structure */
 143: int soo_ioctl();
 144: #define SOO_IOCTL(fp, cmd, data) \
 145:     KScall(soo_ioctl, sizeof(struct socket *) + sizeof(int) + \
 146:         sizeof(caddr_t), fp->f_socket, cmd, data)
 147: 
 148: /* note; pass pointer to a socket, not pointer to file structure */
 149: int soo_select();
 150: #define SOO_SELECT(fp, which) \
 151:     KScall(soo_select, sizeof(struct socket *) + sizeof(int), \
 152:         fp->f_socket, which)
 153: 
 154: int soo_stat();
 155: #define SOO_STAT(so, ub) \
 156:     KScall(soo_stat, sizeof(struct socket *) + sizeof(struct stat *), \
 157:         so, ub)
 158: 
 159: int soreceive();
 160: #define SORECEIVE(so, aname, uiop, flags, rightsp) \
 161:     KScall(soreceive, sizeof(struct socket *) + sizeof(struct mbuf **) + \
 162:         sizeof(struct uio *) + sizeof(int) + sizeof(struct mbuf **), \
 163:         so, aname, uiop, flags, rightsp)
 164: 
 165: int sosend();
 166: #define SOSEND(so, nam, uiop, flags, rights) \
 167:     KScall(sosend, sizeof(struct socket *) + sizeof(struct mbuf *) + \
 168:         sizeof(struct uio *) + sizeof(int) + sizeof(struct mbuf *), \
 169:         so, nam, uiop, flags, rights)
 170: 
 171: int sosetopt();
 172: #define SOSETOPT(so, level, optname, m0) \
 173:     KScall(sosetopt, sizeof(struct socket *) + sizeof(int) + \
 174:         sizeof(int) + sizeof(struct mbuf *), so, level, optname, m0)
 175: 
 176: int soshutdown();
 177: #define SOSHUTDOWN(so, how) \
 178:     KScall(soshutdown, sizeof(struct socket *) + sizeof(int), so, how)
 179: 
 180: int timeout();
 181: #define TIMEOUT(fun, arg, t) \
 182:     SKcall(timeout, sizeof(memaddr) + sizeof(caddr_t) + sizeof(int), \
 183:         SUPERADD(fun), (caddr_t)arg, t)
 184: 
 185: int ttstart();
 186: #define TTSTART(tp) \
 187:     SKcall(ttstart, sizeof(struct tty *), tp)
 188: 
 189: int ttyflush();
 190: #define TTYFLUSH(tp, rw) \
 191:     SKcall(ttyflush, sizeof(struct tty *) + sizeof(int), tp, rw)
 192: 
 193: int ttywflush();
 194: #define TTYWFLUSH(tp) \
 195:     SKcall(ttywflush, sizeof(struct tty *), tp)
 196: 
 197: int unpbind();
 198: #define UNPBIND(path, len, ipp, unpsock) \
 199:     SKcall(unpbind, sizeof(char *) + sizeof(int) + \
 200:         sizeof(struct inode **) + sizeof(struct socket *), \
 201:         path, len, ipp, unpsock)
 202: 
 203: int unpconn();
 204: #define UNPCONN(path, len, so2, ipp) \
 205:     SKcall(unpconn, sizeof(char *) + sizeof(int) + \
 206:         sizeof(struct socket **) + sizeof(struct inode **), \
 207:         path, len, so2, ipp)
 208: 
 209: int unputc();
 210: #define UNPUTC(p) \
 211:     SKcall(unputc, sizeof(struct clist *), p)
 212: 
 213: void unpdet();
 214: #define UNPDET(ip) \
 215:     SKcall(unpdet, sizeof(struct inode *), ip)
 216: 
 217: int wakeup();
 218: #define WAKEUP(chan) \
 219:     SKcall(wakeup, sizeof(caddr_t), SUPERADD(chan))

Defined macros

ASOQREMQUE defined in line 10; used 1 times
B_TO_Q defined in line 14; used 1 times
CONNWHILE defined in line 19; used 1 times
FPFETCH defined in line 28; used 4 times
FPFLAGS defined in line 33; used 3 times
GSIGNAL defined in line 38; used 2 times
IPUT defined in line 59; used 1 times
M_FREE defined in line 42; used 1 times
M_FREEM defined in line 46; used 2 times
NETCOPYOUT defined in line 50; used 3 times
NETCRASH defined in line 55; used 1 times
NETPFIND defined in line 63; used 2 times
NETSETHZ defined in line 71; used 1 times
NETSTART defined in line 75; used 1 times
PUTC defined in line 79; used 6 times
SELWAKEUP defined in line 83; used 2 times
SOACC1 defined in line 91; used 1 times
SOACCEPT defined in line 95; used 1 times
SOBIND defined in line 100; used 1 times
SOCLOSE defined in line 105; used 3 times
SOCON1 defined in line 109; used 1 times
SOCON2 defined in line 114; used 2 times
SOCREATE defined in line 119; used 3 times
SOGETNAM defined in line 124; used 1 times
SOGETOPT defined in line 129; used 1 times
SOGETPEER defined in line 134; used 1 times
SOLISTEN defined in line 139; used 1 times
SOO_IOCTL defined in line 144; used 1 times
SOO_SELECT defined in line 150; used 1 times
SOO_STAT defined in line 155; used 1 times
SOSEND defined in line 166; used 2 times
SOSETOPT defined in line 172; used 1 times
SOSHUTDOWN defined in line 177; used 1 times
TTSTART defined in line 186; used 1 times
TTYFLUSH defined in line 190; never used
TTYWFLUSH defined in line 194; never used
UNPBIND defined in line 198; used 1 times
UNPCONN defined in line 204; used 1 times
UNPDET defined in line 214; used 1 times
UNPUTC defined in line 210; used 2 times

Usage of this include

net_mac.h used 1 times
Last modified: 1997-02-15
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 202
Valid CSS Valid XHTML 1.0 Strict