if (!(f = fopen(fn, "w"))) {
daemon_log(LOG_ERR, "fopen() failed: %s", strerror(errno));
goto fail;
}
if (!(f = fopen(fn, "w"))) {
daemon_log(LOG_ERR, "fopen() failed: %s", strerror(errno));
goto fail;
}
fprintf(f, "%s\n", inet_ntop(AF_INET, &addr, buf, sizeof (buf)));
fclose(f);
fprintf(f, "%s\n", inet_ntop(AF_INET, &addr, buf, sizeof (buf)));
fclose(f);
sa.sll_halen = ETHER_ADDRLEN;
memset(sa.sll_addr, 0xFF, ETHER_ADDRLEN);
sa.sll_halen = ETHER_ADDRLEN;
memset(sa.sll_addr, 0xFF, ETHER_ADDRLEN);
- if (sendto(fd, packet, packet_len, 0, (struct sockaddr*) &sa, sizeof(sa)) < 0) {
+ if (sendto(fd, packet->ether_payload, packet_len, 0, (struct sockaddr*) &sa, sizeof(sa)) < 0) {
callout_event_table[info.event],
name,
inet_ntop(AF_INET, &info.address, buf, sizeof(buf)), NULL) < 0) {
callout_event_table[info.event],
name,
inet_ntop(AF_INET, &info.address, buf, sizeof(buf)), NULL) < 0) {
" -w --wait Wait until an address has been acquired before\n"
" daemonizing\n"
" --force-bind Assign an IPv4LL address even if a routable address\n"
" -w --wait Wait until an address has been acquired before\n"
" daemonizing\n"
" --force-bind Assign an IPv4LL address even if a routable address\n"
{ "check", no_argument, NULL, 'c' },
{ "version", no_argument, NULL, 'V' },
{ "start", required_argument, NULL, 'S' },
{ "check", no_argument, NULL, 'c' },
{ "version", no_argument, NULL, 'V' },
{ "start", required_argument, NULL, 'S' },
{ "wait", no_argument, NULL, 'w' },
{ "force-bind", no_argument, NULL, OPTION_FORCE_BIND },
{ "no-drop-root", no_argument, NULL, OPTION_NO_DROP_ROOT },
{ "wait", no_argument, NULL, 'w' },
{ "force-bind", no_argument, NULL, OPTION_FORCE_BIND },
{ "no-drop-root", no_argument, NULL, OPTION_NO_DROP_ROOT },
- while ((c = getopt_long(argc, argv, "hDskrcVS:w", long_options, NULL)) >= 0) {
+ while ((c = getopt_long(argc, argv, "hDskrcVS:t:w", long_options, NULL)) >= 0) {