version 1.1.1.1, 2013/07/29 19:37:40
|
version 1.1.1.2, 2014/06/15 16:31:38
|
Line 20
|
Line 20
|
nothing is sent to stdout a message is sent to stderr and a |
nothing is sent to stdout a message is sent to stderr and a |
non-zero error code is returned. |
non-zero error code is returned. |
|
|
Requires dnsmasq 2.40 or later. | This version requires dnsmasq 2.67 or later. |
*/ |
*/ |
|
|
#include <sys/types.h> |
#include <sys/types.h> |
Line 46
|
Line 46
|
#define OPTION_LEASE_TIME 51 |
#define OPTION_LEASE_TIME 51 |
#define OPTION_OVERLOAD 52 |
#define OPTION_OVERLOAD 52 |
#define OPTION_MESSAGE_TYPE 53 |
#define OPTION_MESSAGE_TYPE 53 |
|
#define OPTION_REQUESTED_OPTIONS 55 |
#define OPTION_END 255 |
#define OPTION_END 255 |
#define DHCPINFORM 8 |
#define DHCPINFORM 8 |
#define DHCP_SERVER_PORT 67 |
#define DHCP_SERVER_PORT 67 |
Line 167 int main(int argc, char **argv)
|
Line 168 int main(int argc, char **argv)
|
*(p++) = 1; |
*(p++) = 1; |
*(p++) = DHCPINFORM; |
*(p++) = DHCPINFORM; |
|
|
|
/* Explicity request the lease time, it won't be sent otherwise: |
|
this is a dnsmasq extension, not standard. */ |
|
*(p++) = OPTION_REQUESTED_OPTIONS; |
|
*(p++) = 1; |
|
*(p++) = OPTION_LEASE_TIME; |
|
|
*(p++) = OPTION_END; |
*(p++) = OPTION_END; |
|
|
dest.sin_family = AF_INET; |
dest.sin_family = AF_INET; |