xref: /freebsd/sys/gdb/netgdb.h (revision dda17b3672f2c7f661699a69ea4462710a52480d)
1*dda17b36SConrad Meyer /*-
2*dda17b36SConrad Meyer  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3*dda17b36SConrad Meyer  *
4*dda17b36SConrad Meyer  * Copyright (c) 2019 Isilon Systems, LLC.
5*dda17b36SConrad Meyer  *
6*dda17b36SConrad Meyer  * Redistribution and use in source and binary forms, with or without
7*dda17b36SConrad Meyer  * modification, are permitted provided that the following conditions
8*dda17b36SConrad Meyer  * are met:
9*dda17b36SConrad Meyer  * 1. Redistributions of source code must retain the above copyright
10*dda17b36SConrad Meyer  *    notice, this list of conditions and the following disclaimer.
11*dda17b36SConrad Meyer  * 2. Redistributions in binary form must reproduce the above copyright
12*dda17b36SConrad Meyer  *    notice, this list of conditions and the following disclaimer in the
13*dda17b36SConrad Meyer  *    documentation and/or other materials provided with the distribution.
14*dda17b36SConrad Meyer  *
15*dda17b36SConrad Meyer  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16*dda17b36SConrad Meyer  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17*dda17b36SConrad Meyer  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18*dda17b36SConrad Meyer  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19*dda17b36SConrad Meyer  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20*dda17b36SConrad Meyer  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21*dda17b36SConrad Meyer  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22*dda17b36SConrad Meyer  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23*dda17b36SConrad Meyer  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24*dda17b36SConrad Meyer  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25*dda17b36SConrad Meyer  * SUCH DAMAGE.
26*dda17b36SConrad Meyer  *
27*dda17b36SConrad Meyer  * $FreeBSD$
28*dda17b36SConrad Meyer  */
29*dda17b36SConrad Meyer #pragma once
30*dda17b36SConrad Meyer 
31*dda17b36SConrad Meyer /*
32*dda17b36SConrad Meyer  * Protocol information, for use by the userspace proxy server.
33*dda17b36SConrad Meyer  *
34*dda17b36SConrad Meyer  * It might make sense to allow not hardcoding these parameters as future work
35*dda17b36SConrad Meyer  * (e.g., for use in environments with arbitrary port filtering).
36*dda17b36SConrad Meyer  *
37*dda17b36SConrad Meyer  * The herald port is only used for initial handshake.  The proxy server will
38*dda17b36SConrad Meyer  * choose a different remote port to connect back to the NetGDB client on by
39*dda17b36SConrad Meyer  * sending the HERALD ACK from that other port.
40*dda17b36SConrad Meyer  */
41*dda17b36SConrad Meyer #define	NETGDB_HERALDPORT	20025
42*dda17b36SConrad Meyer #define	NETGDB_CLIENTPORT	20026
43*dda17b36SConrad Meyer 
44*dda17b36SConrad Meyer #define	NETGDB_PROTO_V1		0x2515f095	/* Rolled a 2^32 sided die. */
45