linux/net/netfilter/nf_log.c

// SPDX-License-Identifier: GPL-2.0-only
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/skbuff.h>
#include <linux/netfilter.h>
#include <linux/seq_file.h>
#include <net/protocol.h>
#include <net/netfilter/nf_log.h>

#include "nf_internals.h"

/* Internal logging interface, which relies on the real
   LOG target modules */

#define NFLOGGER_NAME_LEN

int sysctl_nf_log_all_netns __read_mostly;
EXPORT_SYMBOL();

static struct nf_logger __rcu *loggers[NFPROTO_NUMPROTO][NF_LOG_TYPE_MAX] __read_mostly;
static DEFINE_MUTEX(nf_log_mutex);

#define nft_log_dereference(logger)

static struct nf_logger *__find_logger(int pf, const char *str_logger)
{}

int nf_log_set(struct net *net, u_int8_t pf, const struct nf_logger *logger)
{}
EXPORT_SYMBOL();

void nf_log_unset(struct net *net, const struct nf_logger *logger)
{}
EXPORT_SYMBOL();

/* return EEXIST if the same logger is registered, 0 on success. */
int nf_log_register(u_int8_t pf, struct nf_logger *logger)
{}
EXPORT_SYMBOL();

void nf_log_unregister(struct nf_logger *logger)
{}
EXPORT_SYMBOL();

int nf_log_bind_pf(struct net *net, u_int8_t pf,
		   const struct nf_logger *logger)
{}
EXPORT_SYMBOL();

void nf_log_unbind_pf(struct net *net, u_int8_t pf)
{}
EXPORT_SYMBOL();

int nf_logger_find_get(int pf, enum nf_log_type type)
{}
EXPORT_SYMBOL_GPL();

void nf_logger_put(int pf, enum nf_log_type type)
{}
EXPORT_SYMBOL_GPL();

void nf_log_packet(struct net *net,
		   u_int8_t pf,
		   unsigned int hooknum,
		   const struct sk_buff *skb,
		   const struct net_device *in,
		   const struct net_device *out,
		   const struct nf_loginfo *loginfo,
		   const char *fmt, ...)
{}
EXPORT_SYMBOL();

void nf_log_trace(struct net *net,
		  u_int8_t pf,
		  unsigned int hooknum,
		  const struct sk_buff *skb,
		  const struct net_device *in,
		  const struct net_device *out,
		  const struct nf_loginfo *loginfo, const char *fmt, ...)
{}
EXPORT_SYMBOL();

#define S_SIZE

struct nf_log_buf {};
static struct nf_log_buf emergency, *emergency_ptr =;

__printf(2, 3) int nf_log_buf_add(struct nf_log_buf *m, const char *f, ...)
{}
EXPORT_SYMBOL_GPL();

struct nf_log_buf *nf_log_buf_open(void)
{}
EXPORT_SYMBOL_GPL();

void nf_log_buf_close(struct nf_log_buf *m)
{}
EXPORT_SYMBOL_GPL();

#ifdef CONFIG_PROC_FS
static void *seq_start(struct seq_file *seq, loff_t *pos)
{}

static void *seq_next(struct seq_file *s, void *v, loff_t *pos)
{}

static void seq_stop(struct seq_file *s, void *v)
{}

static int seq_show(struct seq_file *s, void *v)
{}

static const struct seq_operations nflog_seq_ops =;
#endif /* PROC_FS */

#ifdef CONFIG_SYSCTL
static char nf_log_sysctl_fnames[NFPROTO_NUMPROTO-NFPROTO_UNSPEC][3];
static struct ctl_table nf_log_sysctl_table[NFPROTO_NUMPROTO];
static struct ctl_table_header *nf_log_sysctl_fhdr;

static struct ctl_table nf_log_sysctl_ftable[] =;

static int nf_log_proc_dostring(const struct ctl_table *table, int write,
			 void *buffer, size_t *lenp, loff_t *ppos)
{}

static int netfilter_log_sysctl_init(struct net *net)
{}

static void netfilter_log_sysctl_exit(struct net *net)
{}
#else
static int netfilter_log_sysctl_init(struct net *net)
{
	return 0;
}

static void netfilter_log_sysctl_exit(struct net *net)
{
}
#endif /* CONFIG_SYSCTL */

static int __net_init nf_log_net_init(struct net *net)
{}

static void __net_exit nf_log_net_exit(struct net *net)
{}

static struct pernet_operations nf_log_net_ops =;

int __init netfilter_log_init(void)
{}