get rid of dtom's in kernel
[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 *
4507dea2 12 * @(#)ccitt_proto.c 7.5 (Berkeley) %G%
9104a31b 13 */
4507dea2
KS
14#define HDLC
15#include "param.h"
16#include "socket.h"
17#include "protosw.h"
18#include "domain.h"
74eec871 19
4507dea2 20#include "x25.h"
74eec871
KS
21
22/*
23 * Definitions of protocols supported in the CCITT domain.
24 */
25
26#ifdef BSD4_3
27extern struct domain ccittdomain;
e3921cae
KS
28#define DOMAIN &ccittdomain
29#else
30#define DOMAIN PF_CCITT
74eec871
KS
31#endif
32
33#ifdef XE
34int xe_output (), xe_ctlinput (), xe_init(), xe_timer();
35#endif
36#ifdef HDLC
37int hd_output (), hd_ctlinput (), hd_init (), hd_timer ();
38#endif
4507dea2 39int pk_usrreq (), pk_timer (), pk_init (), pk_ctloutput ();
74eec871
KS
40
41struct protosw ccittsw[] = {
42#ifdef XE
e3921cae 43 { 0, DOMAIN, IEEEPROTO_802LLC,0,
74eec871
KS
44 0, xe_output, xe_ctlinput, 0,
45 0,
46 xe_init, 0, xe_timer, 0,
47 },
48#endif
49#ifdef HDLC
e3921cae 50 { 0, DOMAIN, CCITTPROTO_HDLC,0,
74eec871
KS
51 0, hd_output, hd_ctlinput, 0,
52 0,
53 hd_init, 0, hd_timer, 0,
54 },
55#endif
e3921cae 56 { SOCK_STREAM, DOMAIN, CCITTPROTO_X25, PR_CONNREQUIRED|PR_ATOMIC|PR_WANTRCVD,
4507dea2 57 0, 0, 0, pk_ctloutput,
74eec871 58 pk_usrreq,
b84e7ca8 59 pk_init, 0, pk_timer, 0,
74eec871
KS
60 }
61};
62
63struct domain ccittdomain =
64#ifdef BSD4_3
65 { AF_CCITT, "ccitt", 0, 0, 0, ccittsw,
66 &ccittsw[sizeof(ccittsw)/sizeof(ccittsw[0])] };
67#else
68 { AF_CCITT, "ccitt", ccittsw, &ccittsw[sizeof(ccittsw)/sizeof(ccittsw[0])] };
69#endif