public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
fda0ef638df1876ec3def43daa772c81f3f013d3 blob 1193 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
 
/* SPDX-License-Identifier: GPL-2.0-or-later
 * Copyright Red Hat
 * Author: David Gibson <david@gibson.dropbear.id.au>
 *
 * Definitions and functions used by both client and server of the configuration
 * update protocol (pesto).
 */

#ifndef PESTO_H
#define PESTO_H

#include <assert.h>
#include <stdint.h>

#define PESTO_SERVER_MAGIC	"basil:s"

/* Version 0 is reserved for unreleased / unsupported experimental versions */
#define PESTO_PROTOCOL_VERSION	1

/* Maximum size of a pif name, including \0 */
#define	PIF_NAME_SIZE	(128)
#define PIF_NONE	0

/**
 * struct pesto_hello - Server introduction message
 * @magic:		PESTO_SERVER_MAGIC
 * @version:		Version number
 * @pif_name_size:	Server's value for PIF_NAME_SIZE
 */
struct pesto_hello {
	char magic[8];
	uint32_t version;
	uint32_t pif_name_size;
} __attribute__ ((__packed__));

static_assert(sizeof(PESTO_SERVER_MAGIC)
	      == sizeof(((struct pesto_hello *)0)->magic),
	      "PESTO_SERVER_MAGIC has wrong size");

/**
 * struct pesto_pif_info - Message with basic metadata about a pif
 * @name:	Name (\0 terminated)
 */
struct pesto_pif_info {
	char name[PIF_NAME_SIZE];
} __attribute__ ((__packed__));

#endif /* PESTO_H */
debug log:

solving fda0ef6 ...
found fda0ef6 in https://passt.top/passt

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).