FreeBSD/Linux Kernel Cross Reference
sys/netiso/tp_var.h
1 /* $NetBSD: tp_var.h,v 1.13 2006/07/23 22:06:14 ad Exp $ */
2
3 /*-
4 * Copyright (c) 1995 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Christos Zoulas.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the NetBSD
21 * Foundation, Inc. and its contributors.
22 * 4. Neither the name of The NetBSD Foundation nor the names of its
23 * contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE.
37 */
38
39 #ifndef _NETISO_TP_VAR_H_
40 #define _NETISO_TP_VAR_H_
41
42 #ifdef _KERNEL
43 struct isopcb;
44 struct mbuf;
45 struct sockaddr_iso;
46 struct tp_pcb;
47 struct sockaddr_in;
48 struct iso_addr;
49 struct tp_conn_param;
50 struct tp_event;
51 struct inpcb;
52 struct route;
53 struct pklcd;
54 struct sockaddr;
55 struct x25_packet;
56 struct in_addr;
57
58
59 /* tp_cons.c */
60 int tpcons_pcbconnect (void *, struct mbuf *);
61 void *tpcons_ctlinput (int, struct sockaddr *, void *);
62 void tpcons_input (struct mbuf *, ...);
63 int tpcons_output (struct mbuf *, ...);
64 int tpcons_output_dg (struct mbuf *, ...);
65
66 /* tp_driver.c */
67 int tp_driver (struct tp_pcb *, struct tp_event *);
68
69 /* tp_emit.c */
70 int tp_emit (int, struct tp_pcb *, SeqNum, u_int, struct mbuf *);
71 int tp_error_emit (int, u_long, struct sockaddr_iso *,
72 struct sockaddr_iso *, struct mbuf *, int,
73 struct tp_pcb *, caddr_t,
74 int (*) (struct mbuf *, ...));
75
76 /* tp_inet.c */
77 void in_getsufx (void *, u_short *, caddr_t, int);
78 void in_putsufx (void *, caddr_t, int, int);
79 void in_recycle_tsuffix (void *);
80 void in_putnetaddr (void *, struct sockaddr *, int);
81 int in_cmpnetaddr (void *, struct sockaddr *, int);
82 void in_getnetaddr (void *, struct mbuf *, int);
83 int tpip_mtu (void *);
84 int tpip_output (struct mbuf *, ...);
85 int tpip_output_dg (struct mbuf *, ...);
86 void tpip_input (struct mbuf *, ...);
87 void tpin_quench (struct inpcb *, int);
88 void *tpip_ctlinput (int, struct sockaddr *, void *);
89 void tpin_abort (struct inpcb *, int);
90 void dump_inaddr (struct sockaddr_in *);
91
92 /* tp_input.c */
93 struct mbuf *tp_inputprep (struct mbuf *);
94 void tp_input (struct mbuf *, ...);
95 int tp_headersize (int, struct tp_pcb *);
96
97 /* tp_iso.c */
98 void iso_getsufx (void *, u_short *, caddr_t, int);
99 void iso_putsufx (void *, caddr_t, int, int);
100 void iso_recycle_tsuffix (void *);
101 void iso_putnetaddr (void *, struct sockaddr *, int);
102 int iso_cmpnetaddr (void *, struct sockaddr *, int);
103 void iso_getnetaddr (void *, struct mbuf *, int);
104 int tpclnp_mtu (void *);
105 int tpclnp_output (struct mbuf *, ...);
106 int tpclnp_output_dg (struct mbuf *, ...);
107 void tpclnp_input (struct mbuf *, ...);
108 void iso_rtchange (struct isopcb *);
109 void tpiso_decbit (struct isopcb *);
110 void tpiso_quench (struct isopcb *);
111 void *tpclnp_ctlinput (int, struct sockaddr *, void *);
112 void tpclnp_ctlinput1 (int, struct iso_addr *);
113 void tpiso_abort (struct isopcb *);
114 void tpiso_reset (struct isopcb *);
115
116 /* tp_meas.c */
117 void Tpmeas (u_int, u_int, struct timeval *, u_int, u_int, u_int);
118
119 /* tp_output.c */
120 int tp_consistency (struct tp_pcb *, u_int, struct tp_conn_param *);
121 int tp_ctloutput (int, struct socket *, int, int, struct mbuf **);
122
123 /* tp_pcb.c */
124 void tp_init (void);
125 void tp_soisdisconnecting (struct socket *);
126 void tp_soisdisconnected (struct tp_pcb *);
127 void tp_freeref (RefNum);
128 u_long tp_getref (struct tp_pcb *);
129 int tp_set_npcb (struct tp_pcb *);
130 int tp_attach (struct socket *, int);
131 void tp_detach (struct tp_pcb *);
132 int tp_tselinuse (int, caddr_t, struct sockaddr_iso *, int);
133 int tp_pcbbind (void *, struct mbuf *, struct lwp *);
134
135 /* tp_subr.c */
136 int tp_goodXack (struct tp_pcb *, SeqNum);
137 void tp_rtt_rtv (struct tp_pcb *);
138 int tp_goodack (struct tp_pcb *, u_int, SeqNum, u_int);
139 int tp_sbdrop (struct tp_pcb *, SeqNum);
140 void tp_send (struct tp_pcb *);
141 int tp_packetize (struct tp_pcb *, struct mbuf *, int);
142 int tp_stash (struct tp_pcb *, struct tp_event *);
143 void tp_rsyflush (struct tp_pcb *);
144 void tp_rsyset (struct tp_pcb *);
145 void tpsbcheck (struct tp_pcb *, int);
146
147 /* tp_subr2.c */
148 void tp_local_credit (struct tp_pcb *);
149 int tp_protocol_error (struct tp_event *, struct tp_pcb *);
150 void tp_drain (void);
151 void tp_indicate (int, struct tp_pcb *, u_int);
152 void tp_getoptions (struct tp_pcb *);
153 void tp_recycle_tsuffix (void *);
154 void tp_quench (struct inpcb *, int);
155 void tp_netcmd (struct tp_pcb *, int);
156 int tp_mask_to_num (u_char);
157 void tp_mss (struct tp_pcb *, int);
158 int tp_route_to (struct mbuf *, struct tp_pcb *, caddr_t);
159 void tp0_stash (struct tp_pcb *, struct tp_event *);
160 void tp0_openflow (struct tp_pcb *);
161 int tp_setup_perf (struct tp_pcb *);
162 void dump_addr (struct sockaddr *);
163
164 /* tp_timer.c */
165 void tp_timerinit (void);
166 void tp_etimeout (struct tp_pcb *, int, int);
167 void tp_euntimeout (struct tp_pcb *, int);
168 void tp_slowtimo (void);
169 void tp_data_retrans (struct tp_pcb *);
170 void tp_fasttimo (void);
171 void tp_ctimeout (struct tp_pcb *, int, int);
172 void tp_ctimeout_MIN (struct tp_pcb *, int, int);
173 void tp_cuntimeout (struct tp_pcb *, int);
174
175 /* tp_trace.c */
176 void tpTrace (struct tp_pcb *, u_int, u_int, u_int, u_int, u_int, u_int);
177
178 /* tp_usrreq.c */
179 void dump_mbuf (struct mbuf *, const char *);
180 int tp_rcvoob (struct tp_pcb *, struct socket *, struct mbuf *,
181 int *, int);
182 int tp_sendoob (struct tp_pcb *, struct socket *, struct mbuf *, int *);
183 int tp_usrreq (struct socket *, int, struct mbuf *, struct mbuf *,
184 struct mbuf *, struct lwp *);
185 void tp_ltrace (struct socket *, struct uio *);
186 int tp_confirm (struct tp_pcb *);
187 int tp_snd_control (struct mbuf *, struct socket *, struct mbuf **);
188
189 #ifdef TPCONS
190 /* if_cons.c */
191 void nibble_copy (char *, unsigned, char *, unsigned, int);
192 int nibble_match (char *, unsigned, char *, unsigned, int);
193 void cons_init (void);
194 int tp_incoming (struct mbuf *, void *);
195 int cons_tpinput (struct mbuf *, void *);
196 int cons_connect (struct isopcb *);
197 void *cons_ctlinput (int, struct sockaddr *, void *);
198 int find_error_reason (struct x25_packet *);
199 #endif
200
201 #endif
202
203 #endif /* !_NETISO_TP_VAR_H_ */
Cache object: 1c7aff2e2e9d72292026703410fbefc8
|