1 /* $OpenBSD: ddp_var.h,v 1.2 2007/05/26 12:09:40 claudio Exp $ */ 2 3 /* 4 * Copyright (c) 1990,1994 Regents of The University of Michigan. 5 * All Rights Reserved. See COPYRIGHT. 6 */ 7 8 /* 9 * The following is the contents of the COPYRIGHT file from the 10 * netatalk-1.4a2 distribution, from which this file is derived. 11 */ 12 /* 13 * Copyright (c) 1990,1996 Regents of The University of Michigan. 14 * 15 * All Rights Reserved. 16 * 17 * Permission to use, copy, modify, and distribute this software and 18 * its documentation for any purpose and without fee is hereby granted, 19 * provided that the above copyright notice appears in all copies and 20 * that both that copyright notice and this permission notice appear 21 * in supporting documentation, and that the name of The University 22 * of Michigan not be used in advertising or publicity pertaining to 23 * distribution of the software without specific, written prior 24 * permission. This software is supplied as is without expressed or 25 * implied warranties of any kind. 26 * 27 * This product includes software developed by the University of 28 * California, Berkeley and its contributors. 29 * 30 * Solaris code is encumbered by the following: 31 * 32 * Copyright (C) 1996 by Sun Microsystems Computer Co. 33 * 34 * Permission to use, copy, modify, and distribute this software and 35 * its documentation for any purpose and without fee is hereby 36 * granted, provided that the above copyright notice appear in all 37 * copies and that both that copyright notice and this permission 38 * notice appear in supporting documentation. This software is 39 * provided "as is" without express or implied warranty. 40 * 41 * Research Systems Unix Group 42 * The University of Michigan 43 * c/o Wesley Craig 44 * 535 W. William Street 45 * Ann Arbor, Michigan 46 * +1-313-764-2278 47 * netatalk@umich.edu 48 */ 49 /* 50 * None of the Solaris code mentioned is included in OpenBSD. 51 * This code also relies heavily on previous effort in FreeBSD and NetBSD. 52 */ 53 54 #ifndef _NETATALK_DDP_VAR_H_ 55 #define _NETATALK_DDP_VAR_H_ 56 struct ddpcb { 57 struct sockaddr_at ddp_fsat, ddp_lsat; 58 struct route ddp_route; 59 struct socket *ddp_socket; 60 struct ddpcb *ddp_prev, *ddp_next; 61 struct ddpcb *ddp_pprev, *ddp_pnext; 62 }; 63 64 #define sotoddpcb(so) ((struct ddpcb *)(so)->so_pcb) 65 66 struct ddpstat { 67 u_long ddps_short; /* short header packets received */ 68 u_long ddps_long; /* long header packets received */ 69 u_long ddps_nosum; /* no checksum */ 70 u_long ddps_badsum; /* bad checksum */ 71 u_long ddps_tooshort; /* packet too short */ 72 u_long ddps_toosmall; /* not enough data */ 73 u_long ddps_forward; /* packets forwarded */ 74 u_long ddps_cantforward; /* packets rcvd for unreachable dest */ 75 u_long ddps_nosockspace; /* no space in sockbuf for packet */ 76 }; 77 78 #ifdef _KERNEL 79 extern struct ddpcb *ddp_ports[ ATPORT_LAST ]; 80 extern struct ddpcb *ddpcb; 81 extern struct ddpstat ddpstat; 82 #endif 83 84 #endif /* _NETATALK_DDP_VAR_H_ */