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