Combined the interface set into the datalink_init for all the datalink layers. Changed all the demo programs to use datalink_init instead of specific datalink functions.

This commit is contained in:
skarg
2007-05-25 01:08:42 +00:00
parent 076ee5f3ca
commit 8026dc003b
29 changed files with 123 additions and 295 deletions
+3 -7
View File
@@ -39,12 +39,6 @@
static int interface = SOCKET_ERROR; /* SOCKET_ERROR means no open interface */
void bip_set_interface(char *ifname)
{
/*dummy function - to make the demos compile easier */
(void) ifname;
}
/*-----------------------------------*/
static void Error(const char *Msg)
{
@@ -244,7 +238,7 @@ static void set_broadcast_address(uint32_t net_address)
#endif
}
bool bip_init(void)
bool bip_init(char *ifname)
{
int rv = 0; /* return from socket lib calls */
struct sockaddr_in sin = { -1 };
@@ -252,6 +246,8 @@ bool bip_init(void)
int sock_fd = -1;
struct in_addr my_addr;
(void)ifname;
NetInitialize();
RTIP_To_Network_Address(TargetIP, &my_addr);