From 9085abd838928dafd1fb9a92345590a5e88165bd Mon Sep 17 00:00:00 2001 From: goldsimon Date: Thu, 17 May 2007 12:45:50 +0000 Subject: [PATCH] Added comments whether fields are host or network byte order (task #1568) --- src/include/lwip/api.h | 4 ++++ src/include/lwip/api_msg.h | 3 +++ src/include/lwip/netif.h | 5 ++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/include/lwip/api.h b/src/include/lwip/api.h index e2d926aa..87c471a5 100644 --- a/src/include/lwip/api.h +++ b/src/include/lwip/api.h @@ -48,6 +48,10 @@ extern "C" { #endif +/* Throughout this file, IP addresses and port numbers are expected to be in + * the same byte order as in the corresponding pcb. + */ + #define NETCONN_NOCOPY 0x00 #define NETCONN_COPY 0x01 diff --git a/src/include/lwip/api_msg.h b/src/include/lwip/api_msg.h index 3dd39e5f..268cc656 100644 --- a/src/include/lwip/api_msg.h +++ b/src/include/lwip/api_msg.h @@ -47,6 +47,9 @@ extern "C" { #endif +/* IP addresses and port numbers are expected to be in + * the same byte order as in the corresponding pcb. + */ struct api_msg_msg { struct netconn *conn; enum netconn_type conntype; diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h index 252c8581..562e9a1a 100644 --- a/src/include/lwip/netif.h +++ b/src/include/lwip/netif.h @@ -48,6 +48,9 @@ extern "C" { #endif +/* Throughout this file, IP addresses are expected to be in + * the same byte order as in IP_PCB. */ + /** must be the maximum of all used hardware address lengths across all types of interfaces in use */ #define NETIF_MAX_HWADDR_LEN 6U @@ -175,7 +178,7 @@ struct netif *netif_find(char *name); void netif_set_default(struct netif *netif); void netif_set_ipaddr(struct netif *netif, struct ip_addr *ipaddr); -void netif_set_netmask(struct netif *netif, struct ip_addr *netmast); +void netif_set_netmask(struct netif *netif, struct ip_addr *netmask); void netif_set_gw(struct netif *netif, struct ip_addr *gw); void netif_set_up(struct netif *netif); void netif_set_down(struct netif *netif);