};
/* Function to register/unregister log function. */
-int nf_log_register(int pf, struct nf_logger *logger);
-void nf_log_unregister(struct nf_logger *logger);
+int nf_log_register(int pf, const struct nf_logger *logger);
+void nf_log_unregister(const struct nf_logger *logger);
void nf_log_unregister_pf(int pf);
/* Calls the registered backend logging function */
const struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
- struct nf_loginfo *li,
+ const struct nf_loginfo *li,
const char *fmt, ...);
#endif /* _NF_LOG_H */
.me = THIS_MODULE,
};
-static struct nf_logger ebt_log_logger = {
+static const struct nf_logger ebt_log_logger = {
.name = "ebt_log",
.logfn = &ebt_log_packet,
.me = THIS_MODULE,
.me = THIS_MODULE,
};
-static struct nf_logger ebt_ulog_logger = {
+static const struct nf_logger ebt_ulog_logger = {
.name = EBT_ULOG_WATCHER,
.logfn = &ebt_log_packet,
.me = THIS_MODULE,
.me = THIS_MODULE,
};
-static struct nf_logger ipt_log_logger ={
+static const struct nf_logger ipt_log_logger ={
.name = "ipt_LOG",
.logfn = &ipt_log_packet,
.me = THIS_MODULE,
.me = THIS_MODULE,
};
-static struct nf_logger ip6t_logger = {
+static const struct nf_logger ip6t_logger = {
.name = "ip6t_LOG",
.logfn = &ip6t_log_packet,
.me = THIS_MODULE,
#define NF_LOG_PREFIXLEN 128
-static struct nf_logger *nf_loggers[NPROTO];
+static const struct nf_logger *nf_loggers[NPROTO] __read_mostly;
static DEFINE_MUTEX(nf_log_mutex);
/* return EBUSY if somebody else is registered, EEXIST if the same logger
* is registred, 0 on success. */
-int nf_log_register(int pf, struct nf_logger *logger)
+int nf_log_register(int pf, const struct nf_logger *logger)
{
int ret;
}
EXPORT_SYMBOL(nf_log_unregister_pf);
-void nf_log_unregister(struct nf_logger *logger)
+void nf_log_unregister(const struct nf_logger *logger)
{
int i;
const struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
- struct nf_loginfo *loginfo,
+ const struct nf_loginfo *loginfo,
const char *fmt, ...)
{
va_list args;
char prefix[NF_LOG_PREFIXLEN];
- struct nf_logger *logger;
+ const struct nf_logger *logger;
rcu_read_lock();
logger = rcu_dereference(nf_loggers[pf]);
return -ENOTSUPP;
}
-static struct nf_logger nfulnl_logger = {
+static const struct nf_logger nfulnl_logger = {
.name = "nfnetlink_log",
.logfn = &nfulnl_log_packet,
.me = THIS_MODULE,