File: icmp_flow.h

package info (click to toggle)
passt 0.0~git20250919.623dbf6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,052 kB
  • sloc: ansic: 17,865; sh: 3,187; makefile: 361; python: 51
file content (29 lines) | stat: -rw-r--r-- 723 bytes parent folder | download | duplicates (2)
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
/* SPDX-License-Identifier: GPL-2.0-or-later
 * Copyright Red Hat
 * Author: David Gibson <david@gibson.dropbear.id.au>
 *
 * ICMP flow tracking data structures
 */
#ifndef ICMP_FLOW_H
#define ICMP_FLOW_H

/**
 * struct icmp_ping_flow - Descriptor for a flow of ping requests/replies
 * @f:		Generic flow information
 * @seq:	Last sequence number sent to tap, host order, -1: not sent yet
 * @sock:	"ping" socket
 * @ts:		Last associated activity from tap, seconds
 */
struct icmp_ping_flow {
	/* Must be first element */
	struct flow_common f;

	int seq;
	int sock;
	time_t ts;
};

bool icmp_ping_timer(const struct ctx *c, const struct icmp_ping_flow *pingf,
		     const struct timespec *now);

#endif /* ICMP_FLOW_H */