141701Ssklower /* 241701Ssklower * Copyright (c) University of British Columbia, 1984 3*63216Sbostic * Copyright (c) 1990, 1993 4*63216Sbostic * The Regents of the University of California. 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*63216Sbostic * @(#)ccitt_proto.c 8.1 (Berkeley) 06/10/93 1341701Ssklower */ 1441585Ssklower 1557017Sbostic #include <sys/param.h> 1657017Sbostic #include <sys/socket.h> 1757017Sbostic #include <sys/protosw.h> 1857017Sbostic #include <sys/domain.h> 1941585Ssklower 2057017Sbostic #include <netccitt/x25.h> 2157017Sbostic 2257017Sbostic #include <net/radix.h> 2357017Sbostic 2441585Ssklower /* 2557017Sbostic * Definitions of protocols supported in the CCITT domain. 2641585Ssklower */ 2741585Ssklower 2841585Ssklower extern struct domain ccittdomain; 2942276Ssklower #define DOMAIN &ccittdomain 3041585Ssklower 3157021Ssklower #ifdef LLC 3261656Ssklower int llc_output(); 3361656Ssklower void llc_ctlinput(), llc_init(), llc_timer(); 3457021Ssklower #endif 3557021Ssklower #ifdef HDLC 3661656Ssklower int hd_output(); 3761656Ssklower void hd_ctlinput(), hd_init(), hd_timer(); 3857021Ssklower #endif 3961656Ssklower int pk_usrreq(), pk_ctloutput(); 4061656Ssklower void pk_timer(), pk_init(), pk_input(), pk_ctlinput(); 4141585Ssklower 4241585Ssklower struct protosw ccittsw[] = { 4357021Ssklower #ifdef LLC 4457021Ssklower { 0, DOMAIN, IEEEPROTO_802LLC,0, 4557021Ssklower 0, llc_output, llc_ctlinput, 0, 4657021Ssklower 0, 4757021Ssklower llc_init, 0, llc_timer, 0, 4857021Ssklower }, 4957021Ssklower #endif 5041585Ssklower #ifdef HDLC 5142276Ssklower { 0, DOMAIN, CCITTPROTO_HDLC,0, 5241585Ssklower 0, hd_output, hd_ctlinput, 0, 5341585Ssklower 0, 5441585Ssklower hd_init, 0, hd_timer, 0, 5541585Ssklower }, 5641585Ssklower #endif 5742276Ssklower { SOCK_STREAM, DOMAIN, CCITTPROTO_X25, PR_CONNREQUIRED|PR_ATOMIC|PR_WANTRCVD, 5857021Ssklower pk_input, 0, pk_ctlinput, pk_ctloutput, 5941585Ssklower pk_usrreq, 6043361Ssklower pk_init, 0, pk_timer, 0, 6141585Ssklower } 6241585Ssklower }; 6341585Ssklower 6441585Ssklower struct domain ccittdomain = 6541585Ssklower { AF_CCITT, "ccitt", 0, 0, 0, ccittsw, 6654827Ssklower &ccittsw[sizeof(ccittsw)/sizeof(ccittsw[0])], 0, 6754827Ssklower rn_inithead, 32, sizeof (struct sockaddr_x25) }; 68