[component][sal]delete netdev_lo

netdev_lo无需单独处理,可以根据协议去找对应的网络设备
This commit is contained in:
zms123456 2024-09-14 13:49:25 +08:00 committed by GitHub
parent f17a71c2e4
commit accd616e17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 0 additions and 9 deletions

View File

@ -111,8 +111,6 @@ struct netdev
extern struct netdev *netdev_list; extern struct netdev *netdev_list;
/* The default network interface device */ /* The default network interface device */
extern struct netdev *netdev_default; extern struct netdev *netdev_default;
/* The local virtual network device */
extern struct netdev *netdev_lo;
/* The network interface device ping response object */ /* The network interface device ping response object */
struct netdev_ping_resp struct netdev_ping_resp
{ {

View File

@ -35,8 +35,6 @@
struct netdev *netdev_list = RT_NULL; struct netdev *netdev_list = RT_NULL;
/* The default network interface device */ /* The default network interface device */
struct netdev *netdev_default = RT_NULL; struct netdev *netdev_default = RT_NULL;
/* The local virtual network device */
struct netdev *netdev_lo = RT_NULL;
/* The global network register callback */ /* The global network register callback */
static netdev_callback_fn g_netdev_register_callback = RT_NULL; static netdev_callback_fn g_netdev_register_callback = RT_NULL;
static netdev_callback_fn g_netdev_default_change_callback = RT_NULL; static netdev_callback_fn g_netdev_default_change_callback = RT_NULL;

View File

@ -444,11 +444,6 @@ static int socket_init(int family, int type, int protocol, struct sal_socket **r
struct netdev *netdev = RT_NULL; struct netdev *netdev = RT_NULL;
rt_bool_t flag = RT_FALSE; rt_bool_t flag = RT_FALSE;
if (family == AF_UNIX)
{
netdv_def = netdev_lo;
}
if (family < 0 || family > AF_MAX) if (family < 0 || family > AF_MAX)
{ {
return -1; return -1;