public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
blob 898d1e103cb8c87fb1cf1527da7c60b298b8a527 1211 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
32
33
34
35
36
37
38
39
 
/* SPDX-License-Identifier: GPL-2.0-or-later
 * Copyright (c) 2021 Red Hat GmbH
 * Author: Stefano Brivio <sbrivio@redhat.com>
 */

#ifndef UDP_INTERNAL_H
#define UDP_INTERNAL_H

#define UDP_CONN_TIMEOUT	180 /* s, timeout for ephemeral or local bind */
#define UDP_MAX_FRAMES		32  /* max # of frames to receive at once */

extern struct sockaddr_in udp4_localname;
extern struct sockaddr_in6 udp6_localname;

/**
 * struct udp_payload_t - UDP header and data for inbound messages
 * @uh:		UDP header
 * @data:	UDP data
 */
struct udp_payload_t {
	struct udphdr uh;
	char data[USHRT_MAX - sizeof(struct udphdr)];
#ifdef __AVX2__
} __attribute__ ((packed, aligned(32)));
#else
} __attribute__ ((packed, aligned(__alignof__(unsigned int))));
#endif

size_t udp_update_hdr4(const struct ctx *c,
		       struct iphdr *ip4h, const struct sockaddr_in *s_in,
		       struct udp_payload_t *bp,
		       in_port_t dstport, size_t dlen,
		       const struct timespec *now);
size_t udp_update_hdr6(const struct ctx *c,
		       struct ipv6hdr *ip6h, struct sockaddr_in6 *s_in6,
		       struct udp_payload_t *bp,
		       in_port_t dstport, size_t dlen,
		       const struct timespec *now);
#endif /* UDP_INTERNAL_H */

debug log:

solving 898d1e103cb8 ...
found 898d1e103cb8 in https://archives.passt.top/passt-dev/20240621145640.1914287-6-lvivier@redhat.com/ ||
	https://archives.passt.top/passt-dev/20240712153244.831436-5-lvivier@redhat.com/

applying [1/1] https://archives.passt.top/passt-dev/20240621145640.1914287-6-lvivier@redhat.com/
diff --git a/udp_internal.h b/udp_internal.h
new file mode 100644
index 000000000000..898d1e103cb8

Checking patch udp_internal.h...
Applied patch udp_internal.h cleanly.

skipping https://archives.passt.top/passt-dev/20240712153244.831436-5-lvivier@redhat.com/ for 898d1e103cb8
index at:
100644 898d1e103cb8c87fb1cf1527da7c60b298b8a527	udp_internal.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).