From 3b186dabe03895e7b454fcff9698cee23bca8707 Mon Sep 17 00:00:00 2001 From: zhanghongyu Date: Thu, 6 Jul 2023 16:45:51 +0800 Subject: [PATCH] net/if.h: add definitions associated with IF_OPER_ In order to support the compilation of third-party library, we encounter some situations where the macro is not defined, refer to the common implementation of other systems and add relevant definitions. Signed-off-by: zhanghongyu --- include/net/if.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/net/if.h b/include/net/if.h index 9944f9eb892..1d143f52087 100644 --- a/include/net/if.h +++ b/include/net/if.h @@ -126,6 +126,19 @@ # define IFF_IS_IPv4(f) (1) #endif +/* RFC 2863 operational status */ + +enum +{ + IF_OPER_UNKNOWN, + IF_OPER_NOTPRESENT, + IF_OPER_DOWN, + IF_OPER_LOWERLAYERDOWN, + IF_OPER_TESTING, + IF_OPER_DORMANT, + IF_OPER_UP, +}; + /**************************************************************************** * Public Type Definitions ****************************************************************************/