Networking: Fix typos introduced with network interface changes.
This commit is contained in:
parent
5033a6def7
commit
ac72978072
@ -43,6 +43,7 @@
|
||||
#include <assert.h>
|
||||
#include <queue.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/net/net.h>
|
||||
|
||||
@ -98,7 +99,7 @@ int local_listen(FAR struct socket *psock, int backlog)
|
||||
if (psock->s_domain != PF_LOCAL || psock->s_type != SOCK_STREAM)
|
||||
{
|
||||
nerr("ERROR: Unsupported socket family=%d or socket type=%d\n",
|
||||
psocl->s_domain, psock->s_type);
|
||||
psock->s_domain, psock->s_type);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <nuttx/net/net.h>
|
||||
#include <socket/socket.h>
|
||||
|
||||
#include "local/local.h"
|
||||
|
||||
@ -64,8 +65,6 @@ static int local_bind(FAR struct socket *psock,
|
||||
FAR const struct sockaddr *addr, socklen_t addrlen);
|
||||
static int local_connect(FAR struct socket *psock,
|
||||
FAR const struct sockaddr *addr, socklen_t addrlen);
|
||||
static int local_accept(FAR struct socket *psock, FAR struct sockaddr *addr,
|
||||
FAR socklen_t *addrlen, FAR struct socket *newsock);
|
||||
static ssize_t local_send(FAR struct socket *psock, FAR const void *buf,
|
||||
size_t len, int flags);
|
||||
static ssize_t local_sendto(FAR struct socket *psock, FAR const void *buf,
|
||||
@ -284,7 +283,7 @@ static int local_bind(FAR struct socket *psock,
|
||||
{
|
||||
/* Bind the Unix domain connection structure */
|
||||
|
||||
ret psock_local_bind(psock, addr, addrlen);
|
||||
ret = psock_local_bind(psock, addr, addrlen);
|
||||
|
||||
/* Mark the socket bound */
|
||||
|
||||
|
@ -41,11 +41,14 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/net/net.h>
|
||||
#include <netpacket/packet.h>
|
||||
#include <socket/socket.h>
|
||||
|
||||
#include "pkt/pkt.h"
|
||||
|
||||
@ -336,10 +339,10 @@ static int pkt_bind(FAR struct socket *psock, FAR const struct sockaddr *addr,
|
||||
|
||||
/* Verify that a valid address has been provided */
|
||||
|
||||
if (addr->sa_family != AF_PACKET || addrlen < sizeof(struct sockaddr_ll)
|
||||
if (addr->sa_family != AF_PACKET || addrlen < sizeof(struct sockaddr_ll))
|
||||
{
|
||||
nerr("ERROR: Invalid address length: %d < %d\n",
|
||||
addrlen, sizeof(struct sockaddr_ll);
|
||||
addrlen, sizeof(struct sockaddr_ll));
|
||||
return -EBADF;
|
||||
}
|
||||
|
||||
@ -351,7 +354,7 @@ static int pkt_bind(FAR struct socket *psock, FAR const struct sockaddr *addr,
|
||||
|
||||
/* Look at the addr and identify network interface */
|
||||
|
||||
ifindex = addr->sll_ifindex;
|
||||
ifindex = ((struct sockaddr_ll*)addr)->sll_ifindex;
|
||||
|
||||
#if 0
|
||||
/* Get the MAC address of that interface */
|
||||
@ -524,7 +527,6 @@ static int pkt_close(FAR struct socket *psock)
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
default:
|
||||
return -EBADF;
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <arch/irq.h>
|
||||
#include <nuttx/net/net.h>
|
||||
|
Loading…
Reference in New Issue
Block a user