public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
64c75ba481bd87c888cc66c97e17c56c94a09c8c blob 1875 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
 
/* SPDX-License-Identifier: GPL-2.0-or-later
 * Copyright (c) 2021 Red Hat GmbH
 * Author: Stefano Brivio <sbrivio@redhat.com>
 */

#ifndef TCP_H
#define TCP_H

#include <stdbool.h>
#include <stdint.h>

#include <netinet/in.h>
#include <sys/socket.h>

#include "fwd.h"

#define TCP_TIMER_INTERVAL		1000	/* ms */

struct ctx;

void tcp_timer_handler(const struct ctx *c, union epoll_ref ref,
		       unsigned int qpair);
void tcp_listen_handler(const struct ctx *c, union epoll_ref ref,
			const struct timespec *now);
void tcp_sock_handler(const struct ctx *c, union epoll_ref ref,
		      uint32_t events, unsigned int qpair);
int tcp_tap_handler(const struct ctx *c, unsigned int qpair, uint8_t pif,
		    sa_family_t af, const void *saddr, const void *daddr,
		    uint32_t flow_lbl, const struct pool *p, int idx,
		    const struct timespec *now);
int tcp_listen(const struct ctx *c, uint8_t pif, unsigned rule,
	       const union inany_addr *addr, const char *ifname, in_port_t port);
int tcp_init(struct ctx *c);
void tcp_defer_handler(struct ctx *c, const struct timespec *now,
		       struct timespec *timer_run, time_t *keepalive_run,
		       time_t *inactivity_run, unsigned int qpair);

void tcp_update_l2_buf(const unsigned char *eth_d);

extern bool peek_offset_cap;

/**
 * struct tcp_ctx - Execution context for TCP routines
 * @scan_in:		Port scanning state for inbound packets
 * @scan_out:		Port scanning state for outbound packets
 * @pipe_size:		Size of pipes for spliced connections
 * @rto_max:		Maximum retry timeout (in s)
 * @syn_retries:	SYN retries using exponential backoff timeout
 * @syn_linear_timeouts: SYN retries before using exponential backoff timeout
 */
struct tcp_ctx {
	struct fwd_scan scan_in;
	struct fwd_scan scan_out;
	size_t pipe_size;
	int rto_max;
	uint8_t syn_retries;
	uint8_t syn_linear_timeouts;
};

#endif /* TCP_H */
debug log:

solving 64c75ba481bd ...
found 64c75ba481bd in https://archives.passt.top/passt-dev/20260616171052.3785909-7-lvivier@redhat.com/
found 490f1b140e44 in https://archives.passt.top/passt-dev/20260616125130.1324274-7-lvivier@redhat.com/
found 3262a807e5d4 in https://passt.top/passt
preparing index
index prepared:
100644 3262a807e5d4215b371bf673880fbb43cc398801	tcp.h

applying [1/2] https://archives.passt.top/passt-dev/20260616125130.1324274-7-lvivier@redhat.com/
diff --git a/tcp.h b/tcp.h
index 3262a807e5d4..490f1b140e44 100644


applying [2/2] https://archives.passt.top/passt-dev/20260616171052.3785909-7-lvivier@redhat.com/
diff --git a/tcp.h b/tcp.h
index 490f1b140e44..64c75ba481bd 100644

Checking patch tcp.h...
Applied patch tcp.h cleanly.
Checking patch tcp.h...
Applied patch tcp.h cleanly.

index at:
100644 64c75ba481bd87c888cc66c97e17c56c94a09c8c	tcp.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).