Sync with HEAD.
[dragonfly.git] / contrib / dhcp-3.0 / includes / ctrace.h
blob6b0ad756c15837a419488c1deee420cab401ff8c
1 /* trace.h
3 Definitions for dhcp tracing facility... */
5 /*
6 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
7 * Copyright (c) 2001-2003 by Internet Software Consortium
9 * Permission to use, copy, modify, and distribute this software for any
10 * purpose with or without fee is hereby granted, provided that the above
11 * copyright notice and this permission notice appear in all copies.
13 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
14 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
16 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
19 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 * Internet Systems Consortium, Inc.
22 * 950 Charter Street
23 * Redwood City, CA 94063
24 * <info@isc.org>
25 * http://www.isc.org/
27 * This software has been written for Internet Systems Consortium
28 * by Ted Lemon, as part of a project for Nominum, Inc. To learn more
29 * about Internet Systems Consortium, see http://www.isc.org/. To
30 * learn more about Nominum, Inc., see ``http://www.nominum.com''.
33 typedef struct {
34 struct in_addr primary_address;
35 u_int32_t index;
36 struct hardware hw_address;
37 char name [IFNAMSIZ];
38 } trace_interface_packet_t;
40 typedef struct {
41 u_int32_t index;
42 struct iaddr from;
43 u_int16_t from_port;
44 struct hardware hfrom;
45 u_int8_t havehfrom;
46 } trace_inpacket_t;
48 typedef struct {
49 u_int32_t index;
50 struct iaddr from;
51 struct iaddr to;
52 u_int16_t to_port;
53 struct hardware hto;
54 u_int8_t havehto;
55 } trace_outpacket_t;
57 void trace_interface_register (trace_type_t *, struct interface_info *);
58 void trace_interface_input (trace_type_t *, unsigned, char *);
59 void trace_interface_stop (trace_type_t *);
60 void trace_inpacket_stash (struct interface_info *,
61 struct dhcp_packet *, unsigned, unsigned int,
62 struct iaddr, struct hardware *);
63 void trace_inpacket_input (trace_type_t *, unsigned, char *);
64 void trace_inpacket_stop (trace_type_t *);
65 void trace_outpacket_input (trace_type_t *, unsigned, char *);
66 void trace_outpacket_stop (trace_type_t *);
67 ssize_t trace_packet_send (struct interface_info *,
68 struct packet *, struct dhcp_packet *, size_t,
69 struct in_addr,
70 struct sockaddr_in *, struct hardware *);
71 void trace_icmp_input_input (trace_type_t *, unsigned, char *);
72 void trace_icmp_input_stop (trace_type_t *);
73 void trace_icmp_output_input (trace_type_t *, unsigned, char *);
74 void trace_icmp_output_stop (trace_type_t *);
75 void trace_seed_stash (trace_type_t *, unsigned);
76 void trace_seed_input (trace_type_t *, unsigned, char *);
77 void trace_seed_stop (trace_type_t *);