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 * 12 * @(#)ccitt_proto.c 7.7 (Berkeley) 12/08/92 13 */ 14 15 #include <sys/param.h> 16 #include <sys/socket.h> 17 #include <sys/protosw.h> 18 #include <sys/domain.h> 19 20 #include <netccitt/x25.h> 21 22 #include <net/radix.h> 23 24 /* 25 * Definitions of protocols supported in the CCITT domain. 26 */ 27 28 extern struct domain ccittdomain; 29 #define DOMAIN &ccittdomain 30 31 int hd_output (), hd_ctlinput (), hd_init (), hd_timer (); 32 int pk_usrreq (), pk_timer (), pk_init (), pk_ctloutput (); 33 34 struct protosw ccittsw[] = { 35 #ifdef HDLC 36 { 0, DOMAIN, CCITTPROTO_HDLC,0, 37 0, hd_output, hd_ctlinput, 0, 38 0, 39 hd_init, 0, hd_timer, 0, 40 }, 41 #endif 42 { SOCK_STREAM, DOMAIN, CCITTPROTO_X25, PR_CONNREQUIRED|PR_ATOMIC|PR_WANTRCVD, 43 0, 0, 0, pk_ctloutput, 44 pk_usrreq, 45 pk_init, 0, pk_timer, 0, 46 } 47 }; 48 49 struct domain ccittdomain = 50 { AF_CCITT, "ccitt", 0, 0, 0, ccittsw, 51 &ccittsw[sizeof(ccittsw)/sizeof(ccittsw[0])], 0, 52 rn_inithead, 32, sizeof (struct sockaddr_x25) }; 53