Revision 460fec67 slirp/slirp.h
b/slirp/slirp.h | ||
---|---|---|
185 | 185 |
|
186 | 186 |
#include "debug.h" |
187 | 187 |
|
188 |
#include "libslirp.h" |
|
188 | 189 |
#include "ip.h" |
189 | 190 |
#include "tcp.h" |
190 | 191 |
#include "tcp_timer.h" |
... | ... | |
204 | 205 |
|
205 | 206 |
#include "bootp.h" |
206 | 207 |
#include "tftp.h" |
207 |
#include "libslirp.h" |
|
208 |
|
|
209 |
struct Slirp { |
|
210 |
/* virtual network configuration */ |
|
211 |
struct in_addr vnetwork_addr; |
|
212 |
struct in_addr vnetwork_mask; |
|
213 |
struct in_addr vhost_addr; |
|
214 |
struct in_addr vdhcp_startaddr; |
|
215 |
struct in_addr vnameserver_addr; |
|
216 |
|
|
217 |
/* ARP cache for the guest IP addresses (XXX: allow many entries) */ |
|
218 |
uint8_t client_ethaddr[6]; |
|
219 |
|
|
220 |
struct in_addr client_ipaddr; |
|
221 |
char client_hostname[33]; |
|
222 |
|
|
223 |
int restricted; |
|
224 |
struct timeval tt; |
|
225 |
struct ex_list *exec_list; |
|
226 |
|
|
227 |
/* mbuf states */ |
|
228 |
struct mbuf m_freelist, m_usedlist; |
|
229 |
int mbuf_alloced; |
|
230 |
|
|
231 |
/* if states */ |
|
232 |
int if_queued; /* number of packets queued so far */ |
|
233 |
struct mbuf if_fastq; /* fast queue (for interactive data) */ |
|
234 |
struct mbuf if_batchq; /* queue for non-interactive data */ |
|
235 |
struct mbuf *next_m; /* pointer to next mbuf to output */ |
|
236 |
|
|
237 |
/* ip states */ |
|
238 |
struct ipq ipq; /* ip reass. queue */ |
|
239 |
u_int16_t ip_id; /* ip packet ctr, for ids */ |
|
240 |
|
|
241 |
/* bootp/dhcp states */ |
|
242 |
BOOTPClient bootp_clients[NB_BOOTP_CLIENTS]; |
|
243 |
char *bootp_filename; |
|
244 |
|
|
245 |
/* tcp states */ |
|
246 |
struct socket tcb; |
|
247 |
struct socket *tcp_last_so; |
|
248 |
tcp_seq tcp_iss; /* tcp initial send seq # */ |
|
249 |
u_int32_t tcp_now; /* for RFC 1323 timestamps */ |
|
250 |
|
|
251 |
/* udp states */ |
|
252 |
struct socket udb; |
|
253 |
struct socket *udp_last_so; |
|
254 |
|
|
255 |
/* tftp states */ |
|
256 |
char *tftp_prefix; |
|
257 |
struct tftp_session tftp_sessions[TFTP_SESSIONS_MAX]; |
|
258 |
|
|
259 |
}; |
|
260 |
|
|
261 |
extern Slirp slirp_instance; |
|
208 | 262 |
|
209 | 263 |
#ifndef NULL |
210 | 264 |
#define NULL (void *)0 |
211 | 265 |
#endif |
212 | 266 |
|
213 | 267 |
#ifndef FULL_BOLT |
214 |
void if_start _P((void));
|
|
268 |
void if_start _P((Slirp *));
|
|
215 | 269 |
#else |
216 | 270 |
void if_start _P((struct ttys *)); |
217 | 271 |
#endif |
... | ... | |
257 | 311 |
int cksum(struct mbuf *m, int len); |
258 | 312 |
|
259 | 313 |
/* if.c */ |
260 |
void if_init _P((void));
|
|
314 |
void if_init _P((Slirp *));
|
|
261 | 315 |
void if_output _P((struct socket *, struct mbuf *)); |
262 | 316 |
|
263 | 317 |
/* ip_input.c */ |
264 |
void ip_init _P((void));
|
|
318 |
void ip_init _P((Slirp *));
|
|
265 | 319 |
void ip_input _P((struct mbuf *)); |
266 |
void ip_slowtimo _P((void));
|
|
320 |
void ip_slowtimo _P((Slirp *));
|
|
267 | 321 |
void ip_stripoptions _P((register struct mbuf *, struct mbuf *)); |
268 | 322 |
|
269 | 323 |
/* ip_output.c */ |
... | ... | |
278 | 332 |
void tcp_setpersist _P((register struct tcpcb *)); |
279 | 333 |
|
280 | 334 |
/* tcp_subr.c */ |
281 |
void tcp_init _P((void));
|
|
335 |
void tcp_init _P((Slirp *));
|
|
282 | 336 |
void tcp_template _P((struct tcpcb *)); |
283 | 337 |
void tcp_respond _P((struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int)); |
284 | 338 |
struct tcpcb * tcp_newtcpcb _P((struct socket *)); |
Also available in: Unified diff