File: msgbuf-struct.h

package info (click to toggle)
netconsd 0.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 344 kB
  • sloc: ansic: 2,650; cpp: 111; python: 107; makefile: 98
file content (41 lines) | stat: -rw-r--r-- 826 bytes parent folder | download
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
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree.
 */

#ifndef __MSGBUF_STRUCT_H__
#define __MSGBUF_STRUCT_H__

#include <unistd.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>

#ifdef __cplusplus
#define __cpp extern "C"
#else
#define __cpp
#endif

struct ncrx_msg;

struct msg_buf {
	struct msg_buf *next;

	struct iovec iovec;
	struct sockaddr_in6 src;
	uint64_t rcv_time;
	int rcv_flags;
	int rcv_bytes;

	char buf[];
};

__cpp int netconsd_output_init(int nr_workers);
__cpp void netconsd_output_exit(void);
__cpp void netconsd_output_handler(int t, struct in6_addr *src,
				   struct msg_buf *b, struct ncrx_msg *m);

#endif /* __MSGBUF_STRUCT_H__ */