In bip.c getter and setter functions of IP address and Port number expect and return values in the network byte order. All ntoh and hton were eliminated from bip.c.

All other modules changed to be consistent.
arm7 port left unchanged.
This commit is contained in:
bacpack
2010-11-04 13:30:26 +00:00
parent 437112cc52
commit a639864cc8
9 changed files with 46 additions and 46 deletions
+8 -8
View File
@@ -97,11 +97,11 @@ void bip_set_addr(
BIP_Address.s_addr = net_address;
}
/* returns host byte order */
/* returns network byte order */
uint32_t bip_get_addr(
void)
{
return ntohl(BIP_Address.s_addr);
return BIP_Address.s_addr;
}
void bip_set_broadcast_addr(
@@ -110,25 +110,25 @@ void bip_set_broadcast_addr(
BIP_Broadcast_Address.s_addr = net_address;
}
/* returns host byte order */
/* returns network byte order */
uint32_t bip_get_broadcast_addr(
void)
{
return ntohl(BIP_Broadcast_Address.s_addr);
return BIP_Broadcast_Address.s_addr;
}
void bip_set_port(
uint16_t port) /* in host byte order */
uint16_t port) /* in network byte order */
{
BIP_Port = htons(port);
BIP_Port = port;
}
/* returns host byte order */
/* returns network byte order */
uint16_t bip_get_port(
void)
{
return ntohs(BIP_Port);
return BIP_Port;
}
static int bip_decode_bip_address(