Skip to content

Commit

Permalink
[component][sal]delete netdev_lo
Browse files Browse the repository at this point in the history
netdev_lo无需单独处理,可以根据协议去找对应的网络设备
  • Loading branch information
zmshahaha authored Sep 14, 2024
1 parent f17a71c commit accd616
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
2 changes: 0 additions & 2 deletions components/net/netdev/include/netdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ struct netdev
extern struct netdev *netdev_list;
/* The default network interface device */
extern struct netdev *netdev_default;
/* The local virtual network device */
extern struct netdev *netdev_lo;
/* The network interface device ping response object */
struct netdev_ping_resp
{
Expand Down
2 changes: 0 additions & 2 deletions components/net/netdev/src/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
struct netdev *netdev_list = RT_NULL;
/* The default network interface device */
struct netdev *netdev_default = RT_NULL;
/* The local virtual network device */
struct netdev *netdev_lo = RT_NULL;
/* The global network register callback */
static netdev_callback_fn g_netdev_register_callback = RT_NULL;
static netdev_callback_fn g_netdev_default_change_callback = RT_NULL;
Expand Down
5 changes: 0 additions & 5 deletions components/net/sal/src/sal_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,11 +444,6 @@ static int socket_init(int family, int type, int protocol, struct sal_socket **r
struct netdev *netdev = RT_NULL;
rt_bool_t flag = RT_FALSE;

if (family == AF_UNIX)
{
netdv_def = netdev_lo;
}

if (family < 0 || family > AF_MAX)
{
return -1;
Expand Down

0 comments on commit accd616

Please sign in to comment.