Added externs declarations to header files to handle C++ compilation.

Cleaned up BACnet/IP API a little.
This commit is contained in:
skarg
2005-08-13 14:10:21 +00:00
parent fdbe2eab1e
commit 2e87236e9b
36 changed files with 307 additions and 76 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ bool bip_init(void)
// bind the socket to the local port number and IP address
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = htonl(INADDR_ANY);
sin.sin_port = bip_get_port();
sin.sin_port = htons(bip_get_port());
memset(&(sin.sin_zero), '\0', 8);
rv = bind(sock_fd,
(const struct sockaddr*)&sin, sizeof(struct sockaddr));
+2 -2
View File
@@ -205,9 +205,9 @@ static void NetInitialize(void)
exit(1);
}
address.s_addr = gethostaddr();
bip_set_addr(&address);
bip_set_addr(address.s_addr);
/* local broadcast address */
bip_set_ipv4_broadcast_s_addr(INADDR_BROADCAST);
bip_set_broadcast_addr(INADDR_BROADCAST);
/* configure standard BACnet/IP port */
bip_set_port(0xBAC0);
}
+3
View File
@@ -26,6 +26,9 @@
#ifndef NET_H
#define NET_H
#define WIN32_LEAN_AND_MEAN
#define STRICT
#include <winsock2.h>
#define close closesocket