summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-07-06 11:14:24 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-07-06 11:14:24 -0600
commita5e54a4cc710b6e2c0dae4605fdb555233d885ab (patch)
tree0898e7364ab6a97321723af1e0085dc070f8539e
parentf750736df35456e25d3768c1afda76bcd7c29d7d (diff)
downloadpx4-nuttx-a5e54a4cc710b6e2c0dae4605fdb555233d885ab.tar.gz
px4-nuttx-a5e54a4cc710b6e2c0dae4605fdb555233d885ab.tar.bz2
px4-nuttx-a5e54a4cc710b6e2c0dae4605fdb555233d885ab.zip
Updated comments
-rw-r--r--nuttx/include/nuttx/net/ip.h37
-rw-r--r--nuttx/include/nuttx/net/net.h2
-rw-r--r--nuttx/include/nuttx/net/netdev.h4
3 files changed, 15 insertions, 28 deletions
diff --git a/nuttx/include/nuttx/net/ip.h b/nuttx/include/nuttx/net/ip.h
index f31768e86..2012150a3 100644
--- a/nuttx/include/nuttx/net/ip.h
+++ b/nuttx/include/nuttx/net/ip.h
@@ -136,19 +136,7 @@ struct net_iphdr_s
* Public Function Prototypes
****************************************************************************/
-/* uIP application functions
- *
- * Functions used by an application running of top of uIP. This includes
- * functions for opening and closing connections, sending and receiving
- * data, etc.
- */
-
-/* uIP convenience and converting functions.
- *
- * These functions can be used for converting between different data
- * formats used by uIP.
- *
- * Construct an IP address from four bytes.
+/* Construct an IPv4 address from four bytes.
*
* This function constructs an IPv4 address in network byte order.
*
@@ -174,7 +162,9 @@ struct net_iphdr_s
# define net_ip4addr_conv32(addr) (((in_addr_t)((uint16_t*)addr)[1] << 16) | (in_addr_t)((uint16_t*)addr)[0])
#endif
-/* Extract individual bytes from a 32-bit IPv4 IP address that is in network byte order */
+/* Extract individual bytes from a 32-bit IPv4 IP address that is in network
+ * byte order.
+ */
#ifdef CONFIG_ENDIAN_BIG
/* Big-endian byte order: 11223344 */
@@ -209,9 +199,7 @@ struct net_iphdr_s
((uint16_t*)(addr))[7] = HTONS((addr7)); \
} while (0)
-/* Copy an IP address to another IP address.
- *
- * Copies an IP address from one place to another.
+/* Copy an IP address from one place to another.
*
* Example:
*
@@ -267,14 +255,15 @@ struct net_iphdr_s
net_ipaddr_cmp(addr, addr2)
#endif /* !CONFIG_NET_IPv6 */
-/* Compare two IP addresses with netmasks
- *
- * Compares two IP addresses with netmasks. The masks are used to mask
- * out the bits that are to be compared.
+/* Compare two IP addresses under a netmask. The mask is used to mask
+ * out the bits that are to be compared: Buts within the mask much
+ * match exactly; bits outside if the mask are ignored.
*
* Example:
*
- * net_ipaddr_t ipaddr1, ipaddr2, mask;
+ * net_ipaddr_t ipaddr1;
+ * net_ipaddr_t ipaddr2;
+ * net_ipaddr_t mask;
*
* net_ipaddr(&mask, 255,255,255,0);
* net_ipaddr(&ipaddr1, 192,16,1,2);
@@ -298,9 +287,7 @@ bool net_ipaddr_maskcmp(net_ipaddr_t addr1, net_ipaddr_t addr2,
net_ipaddr_t mask);
#endif
-/* Mask out the network part of an IP address.
- *
- * Masks out the network part of an IP address, given the address and
+/* Mask out the network part of an IP address, given the address and
* the netmask.
*
* Example:
diff --git a/nuttx/include/nuttx/net/net.h b/nuttx/include/nuttx/net/net.h
index e2c465a21..e3cbc73bc 100644
--- a/nuttx/include/nuttx/net/net.h
+++ b/nuttx/include/nuttx/net/net.h
@@ -219,7 +219,7 @@ void net_initialize(void);
void net_initlist(FAR struct socketlist *list);
void net_releaselist(FAR struct socketlist *list);
-/* Given a socket descriptor, return the underly NuttX-specific socket
+/* Given a socket descriptor, return the underlying NuttX-specific socket
* structure.
*/
diff --git a/nuttx/include/nuttx/net/netdev.h b/nuttx/include/nuttx/net/netdev.h
index 41d9888b7..6eb06ca5a 100644
--- a/nuttx/include/nuttx/net/netdev.h
+++ b/nuttx/include/nuttx/net/netdev.h
@@ -333,8 +333,8 @@ int devif_timer(struct net_driver_s *dev, devif_poll_callback_t callback, int hs
* Call netdev_carrier_on when the carrier has become available and the device
* is ready to receive/transmit packets.
*
- * Call detdev_carrier_off when the carrier disappeared and the device has moved
- * into non operational state.
+ * Call detdev_carrier_off when the carrier disappeared and the device has
+ * moved into non operational state.
*
****************************************************************************/