linux/include/net/kcm.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Kernel Connection Multiplexor
 *
 * Copyright (c) 2016 Tom Herbert <[email protected]>
 */

#ifndef __NET_KCM_H_
#define __NET_KCM_H_

#include <linux/skbuff.h>
#include <net/sock.h>
#include <net/strparser.h>
#include <uapi/linux/kcm.h>

extern unsigned int kcm_net_id;

#define KCM_STATS_ADD(stat, count)
#define KCM_STATS_INCR(stat)

struct kcm_psock_stats {};

struct kcm_mux_stats {};

struct kcm_stats {};

struct kcm_tx_msg {};

/* Socket structure for KCM client sockets */
struct kcm_sock {};

struct bpf_prog;

/* Structure for an attached lower socket */
struct kcm_psock {};

/* Per net MUX list */
struct kcm_net {};

/* Structure for a MUX */
struct kcm_mux {};

#ifdef CONFIG_PROC_FS
int kcm_proc_init(void);
void kcm_proc_exit(void);
#else
static inline int kcm_proc_init(void) { return 0; }
static inline void kcm_proc_exit(void) { }
#endif

static inline void aggregate_psock_stats(struct kcm_psock_stats *stats,
					 struct kcm_psock_stats *agg_stats)
{}

static inline void aggregate_mux_stats(struct kcm_mux_stats *stats,
				       struct kcm_mux_stats *agg_stats)
{}

#endif /* __NET_KCM_H_ */