diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-11-04 18:54:04 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-11-04 18:54:04 +0000 |
commit | 08a0eae6371ad7d6af7c0d941381fa1e11370a86 (patch) | |
tree | 7a3a8ae8e2b29e3832a17a7def5b0531383172bb /apps/netutils/uiplib/uip_getmacaddr.c | |
parent | 813efa266bb67269669e532b5ce6f00ee2097948 (diff) | |
download | nuttx-08a0eae6371ad7d6af7c0d941381fa1e11370a86.tar.gz nuttx-08a0eae6371ad7d6af7c0d941381fa1e11370a86.tar.bz2 nuttx-08a0eae6371ad7d6af7c0d941381fa1e11370a86.zip |
Add interfaces flags, extend ifconfig, add ifup and ifdown commands (Darcy Gong
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5308 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/netutils/uiplib/uip_getmacaddr.c')
-rw-r--r-- | apps/netutils/uiplib/uip_getmacaddr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/netutils/uiplib/uip_getmacaddr.c b/apps/netutils/uiplib/uip_getmacaddr.c index f4f01a7f3..e0f72f4a7 100644 --- a/apps/netutils/uiplib/uip_getmacaddr.c +++ b/apps/netutils/uiplib/uip_getmacaddr.c @@ -44,6 +44,7 @@ #include <sys/ioctl.h> #include <stdint.h> #include <string.h> +#include <unistd.h> #include <errno.h> #include <netinet/in.h> @@ -96,6 +97,7 @@ int uip_getmacaddr(const char *ifname, uint8_t *macaddr) memcpy(macaddr, &req.ifr_hwaddr.sa_data, IFHWADDRLEN); } + close(sockfd); } } return ret; |