From 76a7272bad960a5d5abb6ec09a1aebc1e5fad1a5 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 20 Jan 2015 18:14:09 -0600 Subject: Correct name of fields in struct sockaddr_in6: sin6_port and sin6_family, not sin_port and sin_family --- apps/nshlib/Kconfig | 56 +++++++++++++++++++-------------------------- apps/nshlib/nsh_mntcmds.c | 4 ++-- apps/nshlib/nsh_routecmds.c | 26 ++++++++++----------- 3 files changed, 39 insertions(+), 47 deletions(-) (limited to 'apps/nshlib') diff --git a/apps/nshlib/Kconfig b/apps/nshlib/Kconfig index dd4676a59..3805ffff4 100644 --- a/apps/nshlib/Kconfig +++ b/apps/nshlib/Kconfig @@ -944,7 +944,7 @@ config NSH_IPv6ADDR_1 provided. This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the first of the 8-values. The default for - all eight values is fc00:0000:0000:0000:0000:0000:0000:0002. + all eight values is fc00::2. config NSH_IPv6ADDR_2 hex "[1]" @@ -955,7 +955,7 @@ config NSH_IPv6ADDR_2 provided. This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the second of the 8-values. The default for - all eight values is fc00:0000:0000:0000:0000:0000:0000:0002. + all eight values is fc00::2. config NSH_IPv6ADDR_3 hex "[2]" @@ -966,7 +966,7 @@ config NSH_IPv6ADDR_3 provided. This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the third of the 8-values. The default for - all eight values is fc00:0000:0000:0000:0000:0000:0000:0002. + all eight values is fc00::2. config NSH_IPv6ADDR_4 hex "[3]" @@ -977,7 +977,7 @@ config NSH_IPv6ADDR_4 provided. This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the fourth of the 8-values. The default for - all eight values is fc00:0000:0000:0000:0000:0000:0000:0002. + all eight values is fc00::2. config NSH_IPv6ADDR_5 hex "[4]" @@ -988,7 +988,7 @@ config NSH_IPv6ADDR_5 provided. This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the fifth of the 8-values. The default for - all eight values is fc00:0000:0000:0000:0000:0000:0000:0002. + all eight values is fc00::2. config NSH_IPv6ADDR_6 hex "[5]" @@ -999,7 +999,7 @@ config NSH_IPv6ADDR_6 provided. This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the sixth of the 8-values. The default for - all eight values is fc00:0000:0000:0000:0000:0000:0000:0002. + all eight values is fc00::2. config NSH_IPv6ADDR_7 hex "[6]" @@ -1010,7 +1010,7 @@ config NSH_IPv6ADDR_7 provided. This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the seventh of the 8-values. The default for - all eight values is fc00:0000:0000:0000:0000:0000:0000:0002. + all eight values is fc00::2. config NSH_IPv6ADDR_8 hex "[7]" @@ -1021,7 +1021,7 @@ config NSH_IPv6ADDR_8 provided. This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the last of the 8-values. The default for - all eight values is fc00:0000:0000:0000:0000:0000:0000:0002. + all eight values is fc00::2. endif # !NSH_DHCPC @@ -1035,8 +1035,7 @@ config NSH_DRIPv6ADDR_1 Default router IP address (aka, Gateway). This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the first of the - 8-values. The default for all eight values is - fc00:0000:0000:0000:0000:0000:0000:0001. + 8-values. The default for all eight values is fc00::1. config NSH_DRIPv6ADDR_2 hex "[1]" @@ -1046,8 +1045,7 @@ config NSH_DRIPv6ADDR_2 Default router IP address (aka, Gateway). This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the second of the - 8-values. The default for all eight values is - fc00:0000:0000:0000:0000:0000:0000:0001. + 8-values. The default for all eight values is fc00::1. config NSH_DRIPv6ADDR_3 hex "[2]" @@ -1057,8 +1055,7 @@ config NSH_DRIPv6ADDR_3 Default router IP address (aka, Gateway). This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the third of the - 8-values. The default for all eight values is - fc00:0000:0000:0000:0000:0000:0000:0001. + 8-values. The default for all eight values is fc00::1. config NSH_DRIPv6ADDR_4 hex "[3]" @@ -1068,8 +1065,7 @@ config NSH_DRIPv6ADDR_4 Default router IP address (aka, Gateway). This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the fourth of the - 8-values. The default for all eight values is - fc00:0000:0000:0000:0000:0000:0000:0001. + 8-values. The default for all eight values is fc00::1. config NSH_DRIPv6ADDR_5 hex "[4]" @@ -1079,8 +1075,7 @@ config NSH_DRIPv6ADDR_5 Default router IP address (aka, Gateway). This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the fifth of the - 8-values. The default for all eight values is - fc00:0000:0000:0000:0000:0000:0000:0001. + 8-values. The default for all eight values is fc00::1. config NSH_DRIPv6ADDR_6 hex "[5]" @@ -1090,8 +1085,7 @@ config NSH_DRIPv6ADDR_6 Default router IP address (aka, Gateway). This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the sixth of the - 8-values. The default for all eight values is - fc00:0000:0000:0000:0000:0000:0000:0001. + 8-values. The default for all eight values is fc00::1. config NSH_DRIPv6ADDR_7 hex "[6]" @@ -1101,8 +1095,7 @@ config NSH_DRIPv6ADDR_7 Default router IP address (aka, Gateway). This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the seventh of the - 8-values. The default for all eight values is - fc00:0000:0000:0000:0000:0000:0000:0001. + 8-values. The default for all eight values is fc00::1. config NSH_DRIPv6ADDR_8 hex "[7]" @@ -1112,8 +1105,7 @@ config NSH_DRIPv6ADDR_8 Default router IP address (aka, Gateway). This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the last of the - 8-values. The default for all eight values is - fc00:0000:0000:0000:0000:0000:0000:0001. + 8-values. The default for all eight values is fc00::1. comment "IPv6 Network mask" @@ -1125,7 +1117,7 @@ config NSH_IPv6NETMASK_1 Network mask. This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the first of the 8-values. The default for - all eight values is fe00:0000:0000:0000:0000:0000:0000:0000. + all eight values is fe00::0. config NSH_IPv6NETMASK_2 hex "[1]" @@ -1135,7 +1127,7 @@ config NSH_IPv6NETMASK_2 Network mask. This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the second of the 8-values. The default for - all eight values is fe00:0000:0000:0000:0000:0000:0000:0000. + all eight values is fe00::0. config NSH_IPv6NETMASK_3 hex "[2]" @@ -1145,7 +1137,7 @@ config NSH_IPv6NETMASK_3 Network mask. This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the third of the 8-values. The default for - all eight values is fe00:0000:0000:0000:0000:0000:0000:0000. + all eight values is fe00::0. config NSH_IPv6NETMASK_4 hex "[3]" @@ -1155,7 +1147,7 @@ config NSH_IPv6NETMASK_4 Network mask. This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the fourth of the 8-values. The default for - all eight values is fe00:0000:0000:0000:0000:0000:0000:0000. + all eight values is fe00::0. config NSH_IPv6NETMASK_5 hex "[4]" @@ -1165,7 +1157,7 @@ config NSH_IPv6NETMASK_5 Network mask. This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the fifth of the 8-values. The default for - all eight values is fe00:0000:0000:0000:0000:0000:0000:0000. + all eight values is fe00::0. config NSH_IPv6NETMASK_6 hex "[5]" @@ -1175,7 +1167,7 @@ config NSH_IPv6NETMASK_6 Network mask. This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the sixth of the 8-values. The default for - all eight values is fe00:0000:0000:0000:0000:0000:0000:0000. + all eight values is fe00::0. config NSH_IPv6NETMASK_7 hex "[6]" @@ -1185,7 +1177,7 @@ config NSH_IPv6NETMASK_7 Network mask. This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the seventh of the 8-values. The default for - all eight values is fe00:0000:0000:0000:0000:0000:0000:0000. + all eight values is fe00::0. config NSH_IPv6NETMASK_8 hex "[7]" @@ -1195,7 +1187,7 @@ config NSH_IPv6NETMASK_8 Network mask. This is a 16-bit integer value in host order. Each of the eight values forming the full IP address must be specified individually. This is the eighth of the 8-values. The default for - all eight values is fe00:0000:0000:0000:0000:0000:0000:0000. + all eight values is fe00::0. endif #NET_IPv6 endmenu # IP Address Configuration diff --git a/apps/nshlib/nsh_mntcmds.c b/apps/nshlib/nsh_mntcmds.c index 55d9df9b6..6857947c5 100644 --- a/apps/nshlib/nsh_mntcmds.c +++ b/apps/nshlib/nsh_mntcmds.c @@ -534,8 +534,8 @@ int cmd_nfsmount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) #ifdef CONFIG_NET_IPv6 sin = (FAR struct sockaddr_in6 *)&data.addr; - sin->sin_family = AF_INET6; - sin->sin_port = htons(NFS_PMAPPORT); + sin->sin6_family = AF_INET6; + sin->sin6_port = htons(NFS_PMAPPORT); memcpy(&sin->sin6_addr, &inaddr, sizeof(struct in6_addr)); data.addrlen = sizeof(struct sockaddr_in6); #else diff --git a/apps/nshlib/nsh_routecmds.c b/apps/nshlib/nsh_routecmds.c index 30489332a..3cf27050d 100644 --- a/apps/nshlib/nsh_routecmds.c +++ b/apps/nshlib/nsh_routecmds.c @@ -135,7 +135,7 @@ int cmd_addroute(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) memset(&target, 0, sizeof(target)); #ifdef CONFIG_NET_IPv6 - target.sin_family = AF_INET6; + target.sin6_family = AF_INET6; memcpy(&target.sin6_addr, &inaddr, sizeof(struct in6_addr)); #else target.sin_family = AF_INET; @@ -159,11 +159,11 @@ int cmd_addroute(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) memset(&netmask, 0, sizeof(netmask)); #ifdef CONFIG_NET_IPv6 - netmask.sin_family = AF_INET6; + netmask.sin6_family = AF_INET6; memcpy(&netmask.sin6_addr, &inaddr, sizeof(struct in6_addr)); #else - netmask.sin_family = AF_INET; - netmask.sin_addr = inaddr; + netmask.sin_family = AF_INET; + netmask.sin_addr = inaddr; #endif /* Convert the router IP address string into its binary form */ @@ -183,11 +183,11 @@ int cmd_addroute(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) memset(&router, 0, sizeof(router)); #ifdef CONFIG_NET_IPv6 - router.sin_family = AF_INET6; + router.sin6_family = AF_INET6; memcpy(&router.sin6_addr, &inaddr, sizeof(struct in6_addr)); #else - router.sin_family = AF_INET; - router.sin_addr = inaddr; + router.sin_family = AF_INET; + router.sin_addr = inaddr; #endif /* Then add the route */ @@ -263,11 +263,11 @@ int cmd_delroute(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) memset(&target, 0, sizeof(target)); #ifdef CONFIG_NET_IPv6 - target.sin_family = AF_INET6; + target.sin6_family = AF_INET6; memcpy(&target.sin6_addr, &inaddr, sizeof(struct in6_addr)); #else - target.sin_family = AF_INET; - target.sin_addr = inaddr; + target.sin_family = AF_INET; + target.sin_addr = inaddr; #endif /* Convert the netmask IP address string into its binary form */ @@ -287,11 +287,11 @@ int cmd_delroute(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) memset(&netmask, 0, sizeof(netmask)); #ifdef CONFIG_NET_IPv6 - netmask.sin_family = AF_INET6; + netmask.sin6_family = AF_INET6; memcpy(&netmask.sin6_addr, &inaddr, sizeof(struct in6_addr)); #else - netmask.sin_family = AF_INET; - netmask.sin_addr = inaddr; + netmask.sin_family = AF_INET; + netmask.sin_addr = inaddr; #endif /* Then delete the route */ -- cgit v1.2.3