]> git.ipfire.org Git - thirdparty/dhcp.git/blob - includes/ctrace.h
copy rights update
[thirdparty/dhcp.git] / includes / ctrace.h
1 /* trace.h
2
3 Definitions for dhcp tracing facility... */
4
5 /*
6 * Copyright (C) 2004-2022 Internet Systems Consortium, Inc. ("ISC")
7 * Copyright (c) 2001-2003 by Internet Software Consortium
8 *
9 * This Source Code Form is subject to the terms of the Mozilla Public
10 * License, v. 2.0. If a copy of the MPL was not distributed with this
11 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 *
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.
20 *
21 * Internet Systems Consortium, Inc.
22 * PO Box 360
23 * Newmarket, NH 03857 USA
24 * <info@isc.org>
25 * https://www.isc.org/
26 *
27 */
28
29 typedef struct {
30 struct in_addr primary_address;
31 u_int32_t index;
32 struct hardware hw_address;
33 char name [IFNAMSIZ];
34 } trace_interface_packet_t;
35
36 typedef struct {
37 u_int32_t index;
38 struct iaddr from;
39 u_int16_t from_port;
40 struct hardware hfrom;
41 u_int8_t havehfrom;
42 } trace_inpacket_t;
43
44 typedef struct {
45 u_int32_t index;
46 struct iaddr from;
47 struct iaddr to;
48 u_int16_t to_port;
49 struct hardware hto;
50 u_int8_t havehto;
51 } trace_outpacket_t;
52
53 void trace_interface_register (trace_type_t *, struct interface_info *);
54 void trace_interface_input (trace_type_t *, unsigned, char *);
55 void trace_interface_stop (trace_type_t *);
56 void trace_inpacket_stash (struct interface_info *,
57 struct dhcp_packet *, unsigned, unsigned int,
58 struct iaddr, struct hardware *);
59 void trace_inpacket_input (trace_type_t *, unsigned, char *);
60 void trace_inpacket_stop (trace_type_t *);
61 void trace_outpacket_input (trace_type_t *, unsigned, char *);
62 void trace_outpacket_stop (trace_type_t *);
63 ssize_t trace_packet_send (struct interface_info *,
64 struct packet *, struct dhcp_packet *, size_t,
65 struct in_addr,
66 struct sockaddr_in *, struct hardware *);
67 void trace_icmp_input_input (trace_type_t *, unsigned, char *);
68 void trace_icmp_input_stop (trace_type_t *);
69 void trace_icmp_output_input (trace_type_t *, unsigned, char *);
70 void trace_icmp_output_stop (trace_type_t *);
71 void trace_seed_stash (trace_type_t *, unsigned);
72 void trace_seed_input (trace_type_t *, unsigned, char *);
73 void trace_seed_stop (trace_type_t *);