xref: /csrg-svn/sys/netccitt/ccitt_proto.c (revision 54827)
141701Ssklower /*
241701Ssklower  * Copyright (c) University of British Columbia, 1984
341701Ssklower  * Copyright (c) 1990 The Regents of the University of California.
441701Ssklower  * All rights reserved.
541701Ssklower  *
641701Ssklower  * This code is derived from software contributed to Berkeley by
741701Ssklower  * the Laboratory for Computation Vision and the Computer Science Department
841701Ssklower  * of the University of British Columbia.
941701Ssklower  *
1041701Ssklower  * %sccs.include.redist.c%
1141701Ssklower  *
12*54827Ssklower  *	@(#)ccitt_proto.c	7.6 (Berkeley) 07/09/92
1341701Ssklower  */
1445165Ssklower #include "param.h"
1545165Ssklower #include "socket.h"
1645165Ssklower #include "protosw.h"
1745165Ssklower #include "domain.h"
1841585Ssklower 
1945165Ssklower #include "x25.h"
2041585Ssklower 
21*54827Ssklower #include "net/radix.h"
2241585Ssklower /*
2341585Ssklower  *	Definitions of protocols supported in the CCITT domain.
2441585Ssklower  */
2541585Ssklower 
2641585Ssklower extern	struct domain ccittdomain;
2742276Ssklower #define DOMAIN &ccittdomain
2841585Ssklower 
2941585Ssklower int	hd_output (), hd_ctlinput (), hd_init (), hd_timer ();
3045165Ssklower int	pk_usrreq (), pk_timer (), pk_init (), pk_ctloutput ();
3141585Ssklower 
3241585Ssklower struct protosw ccittsw[] = {
3341585Ssklower #ifdef HDLC
3442276Ssklower  {	0,		DOMAIN,		CCITTPROTO_HDLC,0,
3541585Ssklower 	0,		hd_output,	hd_ctlinput,	0,
3641585Ssklower 	0,
3741585Ssklower 	hd_init,	0,	 	hd_timer,	0,
3841585Ssklower  },
3941585Ssklower #endif
4042276Ssklower  {	SOCK_STREAM,	DOMAIN,		CCITTPROTO_X25,	PR_CONNREQUIRED|PR_ATOMIC|PR_WANTRCVD,
4145165Ssklower 	0,		0,		0,		pk_ctloutput,
4241585Ssklower 	pk_usrreq,
4343361Ssklower 	pk_init,	0,		pk_timer,	0,
4441585Ssklower  }
4541585Ssklower };
4641585Ssklower 
4741585Ssklower struct domain ccittdomain =
4841585Ssklower 	{ AF_CCITT, "ccitt", 0, 0, 0, ccittsw,
49*54827Ssklower 		&ccittsw[sizeof(ccittsw)/sizeof(ccittsw[0])], 0,
50*54827Ssklower 		rn_inithead, 32, sizeof (struct sockaddr_x25) };
51