have to check for "." when releasing parent directory
[unix-history] / usr / src / sys / netccitt / ccitt_proto.c
CommitLineData
9104a31b
KS
1/*
2 * Copyright (c) University of British Columbia, 1984
3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * the Laboratory for Computation Vision and the Computer Science Department
8 * of the University of British Columbia.
9 *
10 * %sccs.include.redist.c%
11 *
e3921cae 12 * @(#)ccitt_proto.c 7.3 (Berkeley) %G%
9104a31b 13 */
74eec871
KS
14
15#include "../h/param.h"
16#include "../h/socket.h"
17#include "../h/protosw.h"
18#include "../h/domain.h"
19#include "../netccitt/x25.h"
20
21/*
22 * Definitions of protocols supported in the CCITT domain.
23 */
24
25#ifdef BSD4_3
26extern struct domain ccittdomain;
e3921cae
KS
27#define DOMAIN &ccittdomain
28#else
29#define DOMAIN PF_CCITT
74eec871
KS
30#endif
31
32#ifdef XE
33int xe_output (), xe_ctlinput (), xe_init(), xe_timer();
34#endif
35#ifdef HDLC
36int hd_output (), hd_ctlinput (), hd_init (), hd_timer ();
37#endif
38int pk_usrreq (), pk_timer ();
39
40struct protosw ccittsw[] = {
41#ifdef XE
e3921cae 42 { 0, DOMAIN, IEEEPROTO_802LLC,0,
74eec871
KS
43 0, xe_output, xe_ctlinput, 0,
44 0,
45 xe_init, 0, xe_timer, 0,
46 },
47#endif
48#ifdef HDLC
e3921cae 49 { 0, DOMAIN, CCITTPROTO_HDLC,0,
74eec871
KS
50 0, hd_output, hd_ctlinput, 0,
51 0,
52 hd_init, 0, hd_timer, 0,
53 },
54#endif
e3921cae 55 { SOCK_STREAM, DOMAIN, CCITTPROTO_X25, PR_CONNREQUIRED|PR_ATOMIC|PR_WANTRCVD,
74eec871
KS
56 0, 0, 0, 0,
57 pk_usrreq,
58 0, 0, pk_timer, 0,
59 }
60};
61
62struct domain ccittdomain =
63#ifdef BSD4_3
64 { AF_CCITT, "ccitt", 0, 0, 0, ccittsw,
65 &ccittsw[sizeof(ccittsw)/sizeof(ccittsw[0])] };
66#else
67 { AF_CCITT, "ccitt", ccittsw, &ccittsw[sizeof(ccittsw)/sizeof(ccittsw[0])] };
68#endif