fetch.9: Minor fixes.
[dragonfly.git] / sys / netproto / atm / atm_pcb.h
blob1f308d27cc2099f2c6ad056f9c0d4ea9ded5230b
1 /*
3 * ===================================
4 * HARP | Host ATM Research Platform
5 * ===================================
8 * This Host ATM Research Platform ("HARP") file (the "Software") is
9 * made available by Network Computing Services, Inc. ("NetworkCS")
10 * "AS IS". NetworkCS does not provide maintenance, improvements or
11 * support of any kind.
13 * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
14 * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
15 * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
16 * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
17 * In no event shall NetworkCS be responsible for any damages, including
18 * but not limited to consequential damages, arising from or relating to
19 * any use of the Software or related support.
21 * Copyright 1994-1998 Network Computing Services, Inc.
23 * Copies of this Software may be made, however, the above copyright
24 * notice must be reproduced on all copies.
26 * @(#) $FreeBSD: src/sys/netatm/atm_pcb.h,v 1.2 1999/08/28 00:48:36 peter Exp $
27 * @(#) $DragonFly: src/sys/netproto/atm/atm_pcb.h,v 1.2 2003/06/17 04:28:49 dillon Exp $
32 * Core ATM Services
33 * -----------------
35 * ATM socket protocol definitions
39 #ifndef _NETATM_ATM_PCB_H
40 #define _NETATM_ATM_PCB_H
43 #ifdef ATM_KERNEL
45 * ATM Socket PCB
47 * Common structure for all ATM protocol sockets. This control block
48 * will be used for all ATM socket types.
50 struct atm_pcb {
51 struct socket *atp_socket; /* Socket */
52 Atm_connection *atp_conn; /* Connection manager token */
53 u_char atp_type; /* Protocol type (see below) */
54 u_char atp_flags; /* Protocol flags (see below) */
55 Atm_attributes atp_attr; /* Socket's call attributes */
56 char atp_name[T_ATM_APP_NAME_LEN]; /* Owner's name */
58 typedef struct atm_pcb Atm_pcb;
61 * Protocol Types
63 #define ATPT_AAL5 0 /* AAL type 5 protocol */
64 #define ATPT_SSCOP 1 /* SSCOP protocol */
65 #define ATPT_NUM 2 /* Number of protocols */
68 * PCB Flags
73 * Handy macros
75 #define sotoatmpcb(so) ((Atm_pcb *)(so)->so_pcb)
79 * ATM Socket Statistics
81 struct atm_sock_stat {
82 u_long as_connreq[ATPT_NUM]; /* Connection requests */
83 u_long as_inconn[ATPT_NUM]; /* Incoming connection requests */
84 u_long as_conncomp[ATPT_NUM]; /* Connections completed */
85 u_long as_connfail[ATPT_NUM]; /* Connections failed */
86 u_long as_connrel[ATPT_NUM]; /* Connections released */
87 u_long as_connclr[ATPT_NUM]; /* Connections cleared */
88 u_long as_indrop[ATPT_NUM]; /* Input packets dropped */
89 u_long as_outdrop[ATPT_NUM]; /* Output packets dropped */
91 #endif /* ATM_KERNEL */
93 #endif /* _NETATM_ATM_PCB_H */