sd_dhcp_client *client;
if (verbose)
- printf("* %s\n", __func__);
+ log_info("* %s", __func__);
/* Initialize client without Anonymize settings. */
r = sd_dhcp_client_new(&client, false);
sd_dhcp_client *client;
if (verbose)
- printf("* %s\n", __func__);
+ log_info("* %s", __func__);
/* Initialize client with Anonymize settings. */
r = sd_dhcp_client_new(&client, true);
};
if (verbose)
- printf("* %s\n", __func__);
+ log_info("* %s", __func__);
assert_se(dhcp_packet_checksum((uint8_t*)&buf, 20) == be16toh(0x78ae));
}
assert_se(res == DHCP_DISCOVER);
if (verbose)
- printf(" recv DHCP Discover 0x%08x\n", be32toh(dhcp->xid));
+ log_info(" recv DHCP Discover 0x%08x", be32toh(dhcp->xid));
return 0;
}
int res, r;
if (verbose)
- printf("* %s\n", __func__);
+ log_info("* %s", __func__);
r = sd_dhcp_client_new(&client, false);
assert_se(r >= 0);
sizeof(addrs[0].s_addr)) == 0);
if (verbose)
- printf(" DHCP address acquired\n");
+ log_info(" DHCP address acquired");
sd_event_exit(e, 0);
assert_se(msg_bytes[size - 1] == SD_DHCP_OPTION_END);
if (verbose)
- printf(" recv DHCP Request 0x%08x\n", be32toh(xid));
+ log_info(" recv DHCP Request 0x%08x", be32toh(xid));
memcpy(&test_addr_acq_ack[26], &udp_check, sizeof(udp_check));
memcpy(&test_addr_acq_ack[32], &xid, sizeof(xid));
assert_se(res == sizeof(test_addr_acq_ack));
if (verbose)
- printf(" send DHCP Ack\n");
+ log_info(" send DHCP Ack");
return 0;
};
xid = discover->xid;
if (verbose)
- printf(" recv DHCP Discover 0x%08x\n", be32toh(xid));
+ log_info(" recv DHCP Discover 0x%08x", be32toh(xid));
memcpy(&test_addr_acq_offer[26], &udp_check, sizeof(udp_check));
memcpy(&test_addr_acq_offer[32], &xid, sizeof(xid));
assert_se(res == sizeof(test_addr_acq_offer));
if (verbose)
- printf(" sent DHCP Offer\n");
+ log_info(" sent DHCP Offer");
return 0;
}
int res, r;
if (verbose)
- printf("* %s\n", __func__);
+ log_info("* %s", __func__);
r = sd_dhcp_client_new(&client, false);
assert_se(r >= 0);