Skip to content
Permalink
Browse files

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>
  • Loading branch information...
jukkar committed Aug 9, 2018
1 parent f39f234 commit 4b06ae323c6f66fc0ff079e8fe3dc24426bf2e96
Showing with 20 additions and 0 deletions.
  1. +19 −0 include/net/net_event.h
  2. +1 −0 include/net/net_mgmt.h
@@ -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
@@ -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 */

0 comments on commit 4b06ae3

Please sign in to comment.
You can’t perform that action at this time.