diff --git a/bacnet-stack/demo/server/Makefile b/bacnet-stack/demo/server/Makefile index a08571ce..4d0df170 100644 --- a/bacnet-stack/demo/server/Makefile +++ b/bacnet-stack/demo/server/Makefile @@ -9,7 +9,7 @@ BASEDIR = . #DEFINES = -DBACFILE=1 -DPRINT_ENABLED=1 -DBIG_ENDIAN=0 -DBACDL_ETHERNET=1 #DEFINES = -DBACFILE=1 -DPRINT_ENABLED=1 -DBIG_ENDIAN=0 -DBACDL_ARCNET=1 #DEFINES = -DBACFILE=1 -DPRINT_ENABLED=1 -DBIG_ENDIAN=0 -DBACDL_MSTP=1 -DEFINES = -DBACFILE=1 -DPRINT_ENABLED=1 -DBIG_ENDIAN=0 -DBACDL_BIP=1 +DEFINES = -DBACFILE=1 -DPRINT_ENABLED=1 -DBIG_ENDIAN=0 -DBACDL_BIP=1 -DBIP_DEBUG BACNET_PORT = ../../ports/linux BACNET_OBJECT = ../object BACNET_HANDLER = ../handler diff --git a/bacnet-stack/ports/linux/bip-init.c b/bacnet-stack/ports/linux/bip-init.c index 3e75062c..f4dfbfaf 100644 --- a/bacnet-stack/ports/linux/bip-init.c +++ b/bacnet-stack/ports/linux/bip-init.c @@ -82,6 +82,7 @@ static void bip_set_interface(char *ifname) get_local_address_ioctl(ifname, &local_address, SIOCGIFADDR); bip_set_addr(local_address.s_addr); #ifdef BIP_DEBUG + fprintf(stderr, "Interface: %s\n", ifname); fprintf(stderr, "IP Address: %s\n", inet_ntoa(local_address)); #endif /* setup local broadcast address */ @@ -102,6 +103,9 @@ bool bip_init(char *ifname) if (ifname) bip_set_interface(ifname); + else + bip_set_interface("eth0"); + /* assumes that the driver has already been initialized */ sock_fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); bip_set_socket(sock_fd);