1 /*
2  * Copyright (c) 1990 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that: (1) source code distributions
7  * retain the above copyright notice and this paragraph in its entirety, (2)
8  * distributions including binary code include the above copyright notice and
9  * this paragraph in its entirety in the documentation or other materials
10  * provided with the distribution, and (3) all advertising materials mentioning
11  * features or use of this software display the following acknowledgement:
12  * ``This product includes software developed by the University of California,
13  * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14  * the University nor the names of its contributors may be used to endorse
15  * or promote products derived from this software without specific prior
16  * written permission.
17  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20  *
21  * @(#) $Header: os-bsd.h,v 1.15 91/05/05 23:59:11 mccanne Exp $ (LBL)
22  */
23 
24 #include <sys/param.h>
25 
26 #ifndef BSD
27 #define BSD
28 #endif
29 
30 #define SHA(ap) ((ap)->arp_sha)
31 #define SPA(ap) ((ap)->arp_spa)
32 #define THA(ap) ((ap)->arp_tha)
33 #define TPA(ap) ((ap)->arp_tpa)
34 
35 #define EDST(ep) ((ep)->ether_dhost)
36 #define ESRC(ep) ((ep)->ether_shost)
37 
38 #ifndef ETHERTYPE_REVARP
39 #define ETHERTYPE_REVARP 0x8035
40 #endif
41 
42 #ifndef	IPPROTO_ND
43 /* From <netinet/in.h> on a Sun somewhere. */
44 #define	IPPROTO_ND	77
45 #endif
46 
47 #ifndef REVARP_REQUEST
48 #define REVARP_REQUEST 3
49 #endif
50 #ifndef REVARP_REPLY
51 #define REVARP_REPLY 4
52 #endif
53 
54 /* newish RIP commands */
55 #ifndef	RIPCMD_POLL
56 #define	RIPCMD_POLL 5
57 #endif
58 #ifndef	RIPCMD_POLLENTRY
59 #define	RIPCMD_POLLENTRY 6
60 #endif
61 
62 /*
63  * Map BSD names to SunOS names.
64  */
65 #if BSD >= 199006
66 #define RFS_NULL	NFSPROC_NULL
67 #define RFS_GETATTR	NFSPROC_GETATTR
68 #define RFS_SETATTR	NFSPROC_SETATTR
69 #define RFS_ROOT	NFSPROC_ROOT
70 #define RFS_LOOKUP	NFSPROC_LOOKUP
71 #define RFS_READLINK	NFSPROC_READLINK
72 #define RFS_READ	NFSPROC_READ
73 #define RFS_WRITECACHE	NFSPROC_WRITECACHE
74 #define RFS_WRITE	NFSPROC_WRITE
75 #define RFS_CREATE	NFSPROC_CREATE
76 #define RFS_REMOVE	NFSPROC_REMOVE
77 #define RFS_RENAME	NFSPROC_RENAME
78 #define RFS_LINK	NFSPROC_LINK
79 #define RFS_SYMLINK	NFSPROC_SYMLINK
80 #define RFS_MKDIR	NFSPROC_MKDIR
81 #define RFS_RMDIR	NFSPROC_RMDIR
82 #define RFS_READDIR	NFSPROC_READDIR
83 #define RFS_STATFS	NFSPROC_STATFS
84 #define RFS_NPROC	NFSPROC_NPROC
85 #endif
86