diff options
Diffstat (limited to 'apps/examples')
24 files changed, 57 insertions, 7 deletions
diff --git a/apps/examples/discover/discover_main.c b/apps/examples/discover/discover_main.c index cd0cfc4e4..3995c475e 100644 --- a/apps/examples/discover/discover_main.c +++ b/apps/examples/discover/discover_main.c @@ -48,6 +48,7 @@ #include <debug.h> #include <net/if.h> +#include <netinet/in.h> #include <nuttx/net/arp.h> #include <apps/netutils/netlib.h> diff --git a/apps/examples/ftpd/ftpd_main.c b/apps/examples/ftpd/ftpd_main.c index bfd20b093..507d90e5f 100644 --- a/apps/examples/ftpd/ftpd_main.c +++ b/apps/examples/ftpd/ftpd_main.c @@ -44,6 +44,7 @@ #include <debug.h> #include <netinet/in.h> +#include <arpa/inet.h> #include <apps/netutils/netlib.h> #include <apps/netutils/ftpd.h> diff --git a/apps/examples/igmp/igmp.c b/apps/examples/igmp/igmp.c index 730edce97..61272bf3c 100644 --- a/apps/examples/igmp/igmp.c +++ b/apps/examples/igmp/igmp.c @@ -44,7 +44,10 @@ #include <unistd.h> #include <debug.h> +#include <arpa/inet.h> #include <net/if.h> +#include <netinet/in.h> + #include <apps/netutils/netlib.h> #include <apps/netutils/ipmsfilter.h> diff --git a/apps/examples/nettest/nettest.c b/apps/examples/nettest/nettest.c index b1596ec61..a24ce30f4 100644 --- a/apps/examples/nettest/nettest.c +++ b/apps/examples/nettest/nettest.c @@ -44,6 +44,9 @@ #include <debug.h> #include <net/if.h> +#include <arpa/inet.h> +#include <netinet/in.h> + #include <apps/netutils/netlib.h> #include "nettest.h" diff --git a/apps/examples/nettest/nettest.h b/apps/examples/nettest/nettest.h index 5021e05d6..c6ed3f1be 100644 --- a/apps/examples/nettest/nettest.h +++ b/apps/examples/nettest/nettest.h @@ -40,6 +40,8 @@ * Included Files ****************************************************************************/ +#include <arpa/inet.h> + #ifdef NETTEST_HOST #else # include <debug.h> diff --git a/apps/examples/nettest/nettest_client.c b/apps/examples/nettest/nettest_client.c index 8ab5b14d6..7686d0ac8 100644 --- a/apps/examples/nettest/nettest_client.c +++ b/apps/examples/nettest/nettest_client.c @@ -46,6 +46,8 @@ #include <string.h> #include <errno.h> +#include <arpa/inet.h> + #include "nettest.h" /**************************************************************************** diff --git a/apps/examples/nettest/nettest_server.c b/apps/examples/nettest/nettest_server.c index ffa021286..bdea83dc8 100644 --- a/apps/examples/nettest/nettest_server.c +++ b/apps/examples/nettest/nettest_server.c @@ -46,6 +46,8 @@ #include <unistd.h> #include <errno.h> +#include <arpa/inet.h> + #include "nettest.h" /**************************************************************************** diff --git a/apps/examples/poll/net_listener.c b/apps/examples/poll/net_listener.c index 4094753a5..841d7d95c 100644 --- a/apps/examples/poll/net_listener.c +++ b/apps/examples/poll/net_listener.c @@ -54,6 +54,8 @@ #include <debug.h> #include <net/if.h> +#include <netinet/in.h> + #include <apps/netutils/netlib.h> #include "poll_internal.h" diff --git a/apps/examples/poll/net_reader.c b/apps/examples/poll/net_reader.c index 812600d77..beecee275 100644 --- a/apps/examples/poll/net_reader.c +++ b/apps/examples/poll/net_reader.c @@ -54,6 +54,9 @@ #include <debug.h> #include <net/if.h> +#include <arpa/inet.h> +#include <netinet/in.h> + #include <apps/netutils/netlib.h> #include "poll_internal.h" diff --git a/apps/examples/poll/poll_listener.c b/apps/examples/poll/poll_listener.c index d7f4bf495..e253d59ff 100644 --- a/apps/examples/poll/poll_listener.c +++ b/apps/examples/poll/poll_listener.c @@ -51,6 +51,8 @@ #include <errno.h> #include <debug.h> +#include <arpa/inet.h> + #include "poll_internal.h" /**************************************************************************** diff --git a/apps/examples/sendmail/host.c b/apps/examples/sendmail/host.c index d603372ad..28af0d53c 100644 --- a/apps/examples/sendmail/host.c +++ b/apps/examples/sendmail/host.c @@ -43,6 +43,9 @@ #include <string.h> #include <errno.h> +#include <netinet/in.h> + +#include <nuttx/net/ip.h> #include <apps/netutils/smtp.h> /**************************************************************************** @@ -99,5 +102,6 @@ int main(int argc, char **argv, char **envp) g_msg_body, strlen(g_msg_body)); smtp_close(handle); } + return 0; } diff --git a/apps/examples/sendmail/hostdefs.h b/apps/examples/sendmail/hostdefs.h index e9860c22d..e29df7856 100644 --- a/apps/examples/sendmail/hostdefs.h +++ b/apps/examples/sendmail/hostdefs.h @@ -44,8 +44,10 @@ #include <stdbool.h> #include <stdio.h> +#include <arpa/inet.h> + /**************************************************************************** - * Preprocessor Defintiions + * Pre-processor Definitions *****************************************************************************/ #define HTONS(a) htons(a) diff --git a/apps/examples/sendmail/target.c b/apps/examples/sendmail/target.c index 4d7232b4d..684f2b742 100644 --- a/apps/examples/sendmail/target.c +++ b/apps/examples/sendmail/target.c @@ -45,6 +45,10 @@ #include <errno.h> #include <net/if.h> +#include <arpa/inet.h> +#include <netinet/in.h> + +#include <nuttx/net/ip.h> #include <apps/netutils/netlib.h> #include <apps/netutils/smtp.h> diff --git a/apps/examples/tcpecho/tcpecho_main.c b/apps/examples/tcpecho/tcpecho_main.c index cbcafcce5..9e9333e52 100644 --- a/apps/examples/tcpecho/tcpecho_main.c +++ b/apps/examples/tcpecho/tcpecho_main.c @@ -54,8 +54,9 @@ #include <unistd.h> #include <net/if.h> -#include <nuttx/net/arp.h> +#include <netinet/in.h> +#include <nuttx/net/arp.h> #include <apps/netutils/netlib.h> #ifdef CONFIG_EXAMPLES_TCPECHO_DHCPC diff --git a/apps/examples/telnetd/telnetd.c b/apps/examples/telnetd/telnetd.c index be3bbe98d..2541f96ef 100644 --- a/apps/examples/telnetd/telnetd.c +++ b/apps/examples/telnetd/telnetd.c @@ -46,6 +46,7 @@ #include <net/if.h> #include <arpa/inet.h> +#include <netinet/in.h> #include <apps/netutils/telnetd.h> #include <apps/netutils/netlib.h> diff --git a/apps/examples/thttpd/content/netstat/netstat.c b/apps/examples/thttpd/content/netstat/netstat.c index 19c8ca871..133831c4a 100644 --- a/apps/examples/thttpd/content/netstat/netstat.c +++ b/apps/examples/thttpd/content/netstat/netstat.c @@ -43,7 +43,9 @@ #include <stdlib.h> #include <unistd.h> +#include <netinet/in.h> #include <netinet/ether.h> + #include <nuttx/net/netconfig.h> #include <nuttx/net/netdev.h> diff --git a/apps/examples/thttpd/thttpd_main.c b/apps/examples/thttpd/thttpd_main.c index e847ebad3..c2e6325a7 100644 --- a/apps/examples/thttpd/thttpd_main.c +++ b/apps/examples/thttpd/thttpd_main.c @@ -49,6 +49,8 @@ #include <debug.h> #include <net/if.h> +#include <arpa/inet.h> +#include <netinet/in.h> #include <netinet/ether.h> #include <nuttx/net/arp.h> diff --git a/apps/examples/udp/target.c b/apps/examples/udp/target.c index 8b31fc8cd..ac76aec00 100644 --- a/apps/examples/udp/target.c +++ b/apps/examples/udp/target.c @@ -1,5 +1,5 @@ /**************************************************************************** - * examples/udp/nettest.c + * examples/udp/target.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> @@ -41,6 +41,9 @@ #include <stdio.h> #include <debug.h> +#include <arpa/inet.h> +#include <netinet/in.h> + #include <apps/netutils/netlib.h> #include "udp-internal.h" diff --git a/apps/examples/udp/udp-client.c b/apps/examples/udp/udp-client.c index 6b8473582..297cde5f5 100644 --- a/apps/examples/udp/udp-client.c +++ b/apps/examples/udp/udp-client.c @@ -39,7 +39,6 @@ #include <sys/types.h> #include <sys/socket.h> -#include <netinet/in.h> #include <stdio.h> #include <stdlib.h> @@ -47,6 +46,9 @@ #include <string.h> #include <errno.h> +#include <arpa/inet.h> +#include <netinet/in.h> + #include "udp-internal.h" /**************************************************************************** diff --git a/apps/examples/udp/udp-internal.h b/apps/examples/udp/udp-internal.h index da2be440a..49439aedb 100644 --- a/apps/examples/udp/udp-internal.h +++ b/apps/examples/udp/udp-internal.h @@ -45,6 +45,8 @@ # include <debug.h> #endif +#include <arpa/inet.h> + /**************************************************************************** * Definitions ****************************************************************************/ diff --git a/apps/examples/udp/udp-server.c b/apps/examples/udp/udp-server.c index 191f89cc0..e16449b8d 100644 --- a/apps/examples/udp/udp-server.c +++ b/apps/examples/udp/udp-server.c @@ -45,6 +45,8 @@ #include <unistd.h> #include <errno.h> +#include <arpa/inet.h> + #include "udp-internal.h" /**************************************************************************** diff --git a/apps/examples/webserver/webserver_main.c b/apps/examples/webserver/webserver_main.c index 6b5f81127..58e8757ea 100644 --- a/apps/examples/webserver/webserver_main.c +++ b/apps/examples/webserver/webserver_main.c @@ -54,8 +54,9 @@ #include <debug.h> #include <net/if.h> -#include <nuttx/net/arp.h> +#include <netinet/in.h> +#include <nuttx/net/arp.h> #include <apps/netutils/netlib.h> #ifdef CONFIG_EXAMPLES_WEBSERVER_DHCPC diff --git a/apps/examples/wget/hostdefs.h b/apps/examples/wget/hostdefs.h index e9860c22d..e29df7856 100644 --- a/apps/examples/wget/hostdefs.h +++ b/apps/examples/wget/hostdefs.h @@ -44,8 +44,10 @@ #include <stdbool.h> #include <stdio.h> +#include <arpa/inet.h> + /**************************************************************************** - * Preprocessor Defintiions + * Pre-processor Definitions *****************************************************************************/ #define HTONS(a) htons(a) diff --git a/apps/examples/xmlrpc/xmlrpc_main.c b/apps/examples/xmlrpc/xmlrpc_main.c index 025185531..228855e1e 100644 --- a/apps/examples/xmlrpc/xmlrpc_main.c +++ b/apps/examples/xmlrpc/xmlrpc_main.c @@ -63,8 +63,9 @@ #include <unistd.h> #include <net/if.h> -#include <nuttx/net/arp.h> +#include <netinet/in.h> +#include <nuttx/net/arp.h> #include <apps/netutils/netlib.h> #include <apps/netutils/xmlrpc.h> |