Home | History | Annotate | Line # | Download | only in includes
      1  1.2  christos /*	$NetBSD: ctrace.h,v 1.3 2022/04/03 01:10:58 christos Exp $	*/
      2  1.1  christos 
      3  1.1  christos /* trace.h
      4  1.1  christos 
      5  1.1  christos    Definitions for dhcp tracing facility... */
      6  1.1  christos 
      7  1.1  christos /*
      8  1.3  christos  * Copyright (C) 2004-2022 Internet Systems Consortium, Inc. ("ISC")
      9  1.1  christos  * Copyright (c) 2001-2003 by Internet Software Consortium
     10  1.1  christos  *
     11  1.1  christos  * This Source Code Form is subject to the terms of the Mozilla Public
     12  1.1  christos  * License, v. 2.0. If a copy of the MPL was not distributed with this
     13  1.1  christos  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     14  1.1  christos  *
     15  1.1  christos  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
     16  1.1  christos  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     17  1.1  christos  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
     18  1.1  christos  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     19  1.1  christos  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     20  1.1  christos  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
     21  1.1  christos  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     22  1.1  christos  *
     23  1.1  christos  *   Internet Systems Consortium, Inc.
     24  1.3  christos  *   PO Box 360
     25  1.3  christos  *   Newmarket, NH 03857 USA
     26  1.1  christos  *   <info (at) isc.org>
     27  1.1  christos  *   https://www.isc.org/
     28  1.1  christos  *
     29  1.1  christos  */
     30  1.1  christos 
     31  1.1  christos typedef struct {
     32  1.1  christos 	struct in_addr primary_address;
     33  1.1  christos 	u_int32_t index;
     34  1.1  christos 	struct hardware hw_address;
     35  1.1  christos 	char name [IFNAMSIZ];
     36  1.1  christos } trace_interface_packet_t;
     37  1.1  christos 
     38  1.1  christos typedef struct {
     39  1.1  christos 	u_int32_t index;
     40  1.1  christos 	struct iaddr from;
     41  1.1  christos 	u_int16_t from_port;
     42  1.1  christos 	struct hardware hfrom;
     43  1.1  christos 	u_int8_t havehfrom;
     44  1.1  christos } trace_inpacket_t;
     45  1.1  christos 
     46  1.1  christos typedef struct {
     47  1.1  christos 	u_int32_t index;
     48  1.1  christos 	struct iaddr from;
     49  1.1  christos 	struct iaddr to;
     50  1.1  christos 	u_int16_t to_port;
     51  1.1  christos 	struct hardware hto;
     52  1.1  christos 	u_int8_t havehto;
     53  1.1  christos } trace_outpacket_t;
     54  1.1  christos 
     55  1.1  christos void trace_interface_register (trace_type_t *, struct interface_info *);
     56  1.1  christos void trace_interface_input (trace_type_t *, unsigned, char *);
     57  1.1  christos void trace_interface_stop (trace_type_t *);
     58  1.1  christos void trace_inpacket_stash (struct interface_info *,
     59  1.1  christos 			   struct dhcp_packet *, unsigned, unsigned int,
     60  1.1  christos 			   struct iaddr, struct hardware *);
     61  1.1  christos void trace_inpacket_input (trace_type_t *, unsigned, char *);
     62  1.1  christos void trace_inpacket_stop (trace_type_t *);
     63  1.1  christos void trace_outpacket_input (trace_type_t *, unsigned, char *);
     64  1.1  christos void trace_outpacket_stop (trace_type_t *);
     65  1.1  christos ssize_t trace_packet_send (struct interface_info *,
     66  1.3  christos 			   struct packet *, struct dhcp_packet *, size_t,
     67  1.1  christos 			   struct in_addr,
     68  1.1  christos 			   struct sockaddr_in *, struct hardware *);
     69  1.1  christos void trace_icmp_input_input (trace_type_t *, unsigned, char *);
     70  1.1  christos void trace_icmp_input_stop (trace_type_t *);
     71  1.1  christos void trace_icmp_output_input (trace_type_t *, unsigned, char *);
     72  1.1  christos void trace_icmp_output_stop (trace_type_t *);
     73  1.1  christos void trace_seed_stash (trace_type_t *, unsigned);
     74  1.1  christos void trace_seed_input (trace_type_t *, unsigned, char *);
     75  1.1  christos void trace_seed_stop (trace_type_t *);
     76