net: mgmt: Add L4 layer and related events

These events are used by connection management patches following
this one.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2018-08-09 17:12:51 +03:00
commit 4b06ae323c
2 changed files with 20 additions and 0 deletions

View file

@ -146,6 +146,25 @@ enum net_event_ipv4_cmd {
#define NET_EVENT_IPV4_ROUTER_DEL \
(_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_ROUTER_DEL)
/* L4 network events */
#define _NET_L4_LAYER NET_MGMT_LAYER_L4
#define _NET_L4_CORE_CODE 0x114
#define _NET_EVENT_L4_BASE (NET_MGMT_EVENT_BIT | \
NET_MGMT_IFACE_BIT | \
NET_MGMT_LAYER(_NET_L4_LAYER) | \
NET_MGMT_LAYER_CODE(_NET_L4_CORE_CODE))
enum net_event_l4_cmd {
NET_EVENT_L4_CMD_CONNECTED = 1,
NET_EVENT_L4_CMD_DISCONNECTED,
};
#define NET_EVENT_L4_CONNECTED \
(_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_CONNECTED)
#define NET_EVENT_L4_DISCONNECTED \
(_NET_EVENT_L4_BASE | NET_EVENT_L4_CMD_DISCONNECTED)
/** @endcond */
#ifdef CONFIG_NET_MGMT_EVENT_INFO

View file

@ -68,6 +68,7 @@ struct net_if;
/* Useful generic definitions */
#define NET_MGMT_LAYER_L2 1
#define NET_MGMT_LAYER_L3 2
#define NET_MGMT_LAYER_L4 3
/** @endcond */