Socket I/F: Cleanup for good CONFIG_NET_PKT build.

This commit is contained in:
Gregory Nutt 2017-07-14 13:42:31 -06:00
parent 79a09bfd6e
commit 7259ed58eb
3 changed files with 4 additions and 4 deletions

View File

@ -8,6 +8,7 @@ menu "Raw Socket Support"
config NET_PKT config NET_PKT
bool "Socket packet socket support" bool "Socket packet socket support"
default n default n
depends on NET_ETHERNET || EXPERIMENTAL
---help--- ---help---
Enable or disable support for packet sockets. Enable or disable support for packet sockets.
@ -17,6 +18,8 @@ config NET_PKT
a packet socket will bypass the network altogether and be placed in a packet socket will bypass the network altogether and be placed in
the transmission buffer of the network interface driver. the transmission buffer of the network interface driver.
REVISIT: Currently only implemented for Ethernet.
if NET_PKT if NET_PKT
config NET_PKT_CONNS config NET_PKT_CONNS

View File

@ -86,7 +86,7 @@ void pkt_poll(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn)
{ {
/* Setup for the application callback */ /* Setup for the application callback */
dev->d_appdata = &dev->d_buf[NET_LL_HDRLEN(dev) + IPv4UDP_HDRLEN]; dev->d_appdata = &dev->d_buf[NET_LL_HDRLEN(dev)];
dev->d_len = 0; dev->d_len = 0;
dev->d_sndlen = 0; dev->d_sndlen = 0;

View File

@ -92,9 +92,6 @@
int psock_bind(FAR struct socket *psock, const struct sockaddr *addr, int psock_bind(FAR struct socket *psock, const struct sockaddr *addr,
socklen_t addrlen) socklen_t addrlen)
{ {
#ifdef CONFIG_NET_PKT
FAR const struct sockaddr_ll *lladdr = (const struct sockaddr_ll *)addr;
#endif
int errcode; int errcode;
int ret = OK; int ret = OK;