MCPcopy Create free account
hub / github.com/apache/nuttx / netdev_verify

Function netdev_verify

net/netdev/netdev_verify.c:51–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 ****************************************************************************/
50
51bool netdev_verify(FAR struct net_driver_s *dev)
52{
53 FAR struct net_driver_s *chkdev;
54 bool valid = false;
55
56 /* Search the list of registered devices */
57
58 netdev_list_lock();
59 for (chkdev = g_netdevices; chkdev != NULL; chkdev = chkdev->flink)
60 {
61 /* Is the network device that we are looking for? */
62
63 if (chkdev == dev)
64 {
65 /* Yes.. return true */
66
67 valid = true;
68 break;
69 }
70 }
71
72 netdev_list_unlock();
73 return valid;
74}

Callers 4

devif_callback_allocFunction · 0.85
devif_conn_callback_freeFunction · 0.85
devif_dev_callback_freeFunction · 0.85
tcp_pollsetupFunction · 0.85

Calls 2

netdev_list_lockFunction · 0.85
netdev_list_unlockFunction · 0.85

Tested by

no test coverage detected