net: Add prefixes for better logging

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2018-09-13 22:57:56 +03:00 committed by Andrei Vagin
parent a3a42a4ce7
commit 18cb72ac0c
6 changed files with 17 additions and 0 deletions

View file

@ -28,6 +28,9 @@
#include "util.h"
#include "namespaces.h"
#undef LOG_PREFIX
#define LOG_PREFIX "inet: "
#define PB_ALEN_INET 1
#define PB_ALEN_INET6 4

View file

@ -14,6 +14,9 @@
#include "libnetlink.h"
#include "namespaces.h"
#undef LOG_PREFIX
#define LOG_PREFIX "netlink: "
struct netlink_sk_desc {
struct socket_desc sd;
u32 portid;

View file

@ -22,6 +22,9 @@
#include "images/fdinfo.pb-c.h"
#include "namespaces.h"
#undef LOG_PREFIX
#define LOG_PREFIX "packet: "
struct packet_sock_info {
PacketSockEntry *pse;
struct file_desc d;

View file

@ -24,6 +24,9 @@
#include "protobuf.h"
#include "images/sk-packet.pb-c.h"
#undef LOG_PREFIX
#define LOG_PREFIX "skqueue: "
struct sk_packet {
struct list_head list;
SkPacketEntry *entry;

View file

@ -27,6 +27,8 @@
#include "protobuf.h"
#include "images/tcp-stream.pb-c.h"
#undef LOG_PREFIX
#define LOG_PREFIX "tcp: "
static LIST_HEAD(cpt_tcp_repair_sockets);
static LIST_HEAD(rst_tcp_repair_sockets);

View file

@ -29,6 +29,9 @@
#include "util.h"
#include "fdstore.h"
#undef LOG_PREFIX
#define LOG_PREFIX "sockets: "
#ifndef SOCK_DIAG_BY_FAMILY
#define SOCK_DIAG_BY_FAMILY 20
#endif