public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
blob bb390c0fbc267b67ba08d69a76bcdee6790bae03 741 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
/* SPDX-License-Identifier: AGPL-3.0-or-later
 * Copyright Red Hat
 * Author: Stefano Brivio <sbrivio(a)redhat.com>
 * Author: David Gibson <david(a)gibson.dropbear.id.au>
 */

#ifndef PORT_FWD_H
#define PORT_FWD_H

enum port_fwd_mode {
	FWD_SPEC = 1,
	FWD_NONE,
	FWD_AUTO,
	FWD_ALL,
};

typedef uint8_t port_fwd_map[DIV_ROUND_UP(USHRT_MAX, 8)];

/**
 * port_fwd - Describes port forwarding for one protocol and direction
 * @mode:	Overall forwarding mode (all, none, auto, specific ports)
 * @map:	Bitmap describing which ports are forwarded
 * @delta:	Offset between the original destination and mapped port number
 */
struct port_fwd {
	enum port_fwd_mode mode;
	port_fwd_map map;
	in_port_t delta[USHRT_MAX];
};

#endif /* PORT_FWD_H */

debug log:

solving 5507bf2 ...
found 5507bf2 in https://archives.passt.top/passt-dev/20220923045806.956143-3-david@gibson.dropbear.id.au/
found 5f6ad7e in https://archives.passt.top/passt-dev/20220923045806.956143-2-david@gibson.dropbear.id.au/

applying [1/2] https://archives.passt.top/passt-dev/20220923045806.956143-2-david@gibson.dropbear.id.au/
diff --git a/port_fwd.h b/port_fwd.h
new file mode 100644
index 0000000..5f6ad7e


applying [2/2] https://archives.passt.top/passt-dev/20220923045806.956143-3-david@gibson.dropbear.id.au/
diff --git a/port_fwd.h b/port_fwd.h
index 5f6ad7e..5507bf2 100644

Checking patch port_fwd.h...
Applied patch port_fwd.h cleanly.
Checking patch port_fwd.h...
Applied patch port_fwd.h cleanly.

index at:
100644 bb390c0fbc267b67ba08d69a76bcdee6790bae03	port_fwd.h

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).