mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-03 15:56:00 +00:00
Traditionalize; change interface attach message
This commit is contained in:
@@ -61,11 +61,11 @@ int if_register_socket (info, interface)
|
|||||||
|
|
||||||
/* Make sure only one interface is registered. */
|
/* Make sure only one interface is registered. */
|
||||||
if (once)
|
if (once)
|
||||||
error ("The standard socket API can only support hosts "
|
error ("The standard socket API can only support %s%s%s%s%s",
|
||||||
"with a single network interface. If you must "
|
"hosts with a single network interface. If you must ",
|
||||||
"run dhcpd on a host with multiple interfaces, "
|
"run dhcpd on a host with multiple interfaces, ",
|
||||||
"you must compile in BPF or NIT support. If neither "
|
"you must compile in BPF or NIT support. If neither ",
|
||||||
"option is supported on your system, please let us "
|
"option is supported on your system, please let us ",
|
||||||
"know.");
|
"know.");
|
||||||
once = 1;
|
once = 1;
|
||||||
|
|
||||||
@@ -105,12 +105,14 @@ int if_register_socket (info, interface)
|
|||||||
void if_register_send (info, interface)
|
void if_register_send (info, interface)
|
||||||
struct interface_info *info;
|
struct interface_info *info;
|
||||||
struct ifreq *interface;
|
struct ifreq *interface;
|
||||||
|
|
||||||
{
|
{
|
||||||
#ifndef USE_SOCKET_RECEIVE
|
#ifndef USE_SOCKET_RECEIVE
|
||||||
info -> wfdesc = if_register_socket (info, interface);
|
info -> wfdesc = if_register_socket (info, interface);
|
||||||
#else
|
#else
|
||||||
info -> wfdesc = info -> rfdesc;
|
info -> wfdesc = info -> rfdesc;
|
||||||
#endif
|
#endif
|
||||||
|
note ("Sending on Socket/%s", piaddr (info -> address));
|
||||||
}
|
}
|
||||||
#endif /* USE_SOCKET_SEND */
|
#endif /* USE_SOCKET_SEND */
|
||||||
|
|
||||||
@@ -122,6 +124,7 @@ void if_register_receive (info, interface)
|
|||||||
/* If we're using the socket API for sending and receiving,
|
/* If we're using the socket API for sending and receiving,
|
||||||
we don't need to register this interface twice. */
|
we don't need to register this interface twice. */
|
||||||
info -> rfdesc = if_register_socket (info, interface);
|
info -> rfdesc = if_register_socket (info, interface);
|
||||||
|
note ("Listening on Socket/%s", piaddr (info -> address));
|
||||||
}
|
}
|
||||||
#endif /* USE_SOCKET_RECEIVE */
|
#endif /* USE_SOCKET_RECEIVE */
|
||||||
|
|
||||||
|
13
socket.c
13
socket.c
@@ -61,11 +61,11 @@ int if_register_socket (info, interface)
|
|||||||
|
|
||||||
/* Make sure only one interface is registered. */
|
/* Make sure only one interface is registered. */
|
||||||
if (once)
|
if (once)
|
||||||
error ("The standard socket API can only support hosts "
|
error ("The standard socket API can only support %s%s%s%s%s",
|
||||||
"with a single network interface. If you must "
|
"hosts with a single network interface. If you must ",
|
||||||
"run dhcpd on a host with multiple interfaces, "
|
"run dhcpd on a host with multiple interfaces, ",
|
||||||
"you must compile in BPF or NIT support. If neither "
|
"you must compile in BPF or NIT support. If neither ",
|
||||||
"option is supported on your system, please let us "
|
"option is supported on your system, please let us ",
|
||||||
"know.");
|
"know.");
|
||||||
once = 1;
|
once = 1;
|
||||||
|
|
||||||
@@ -105,12 +105,14 @@ int if_register_socket (info, interface)
|
|||||||
void if_register_send (info, interface)
|
void if_register_send (info, interface)
|
||||||
struct interface_info *info;
|
struct interface_info *info;
|
||||||
struct ifreq *interface;
|
struct ifreq *interface;
|
||||||
|
|
||||||
{
|
{
|
||||||
#ifndef USE_SOCKET_RECEIVE
|
#ifndef USE_SOCKET_RECEIVE
|
||||||
info -> wfdesc = if_register_socket (info, interface);
|
info -> wfdesc = if_register_socket (info, interface);
|
||||||
#else
|
#else
|
||||||
info -> wfdesc = info -> rfdesc;
|
info -> wfdesc = info -> rfdesc;
|
||||||
#endif
|
#endif
|
||||||
|
note ("Sending on Socket/%s", piaddr (info -> address));
|
||||||
}
|
}
|
||||||
#endif /* USE_SOCKET_SEND */
|
#endif /* USE_SOCKET_SEND */
|
||||||
|
|
||||||
@@ -122,6 +124,7 @@ void if_register_receive (info, interface)
|
|||||||
/* If we're using the socket API for sending and receiving,
|
/* If we're using the socket API for sending and receiving,
|
||||||
we don't need to register this interface twice. */
|
we don't need to register this interface twice. */
|
||||||
info -> rfdesc = if_register_socket (info, interface);
|
info -> rfdesc = if_register_socket (info, interface);
|
||||||
|
note ("Listening on Socket/%s", piaddr (info -> address));
|
||||||
}
|
}
|
||||||
#endif /* USE_SOCKET_RECEIVE */
|
#endif /* USE_SOCKET_RECEIVE */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user