3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flykt This file is part of systemd.
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flykt Copyright (C) 2014 Tom Gundersen
5da1b97f3c3d15521f2dcfbc18eccd6580122ebcPatrik Flykt Copyright (C) 2014-2015 Intel Corporation. All rights reserved.
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flykt systemd is free software; you can redistribute it and/or modify it
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flykt under the terms of the GNU Lesser General Public License as published by
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flykt the Free Software Foundation; either version 2.1 of the License, or
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flykt (at your option) any later version.
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flykt systemd is distributed in the hope that it will be useful, but
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flykt WITHOUT ANY WARRANTY; without even the implied warranty of
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flykt MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flykt Lesser General Public License for more details.
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flykt You should have received a copy of the GNU Lesser General Public License
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flykt along with systemd; If not, see <http://www.gnu.org/licenses/>.
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flykt ia->timeout_t1 = sd_event_source_unref(ia->timeout_t1);
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flykt ia->timeout_t2 = sd_event_source_unref(ia->timeout_t2);
709d6710d047566c71f03e579a02c3d99fe15a3ePatrik Flyktint dhcp6_lease_ia_rebind_expire(const DHCP6IA *ia, uint32_t *expire) {
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flykt LIST_REMOVE(addresses, ia->addresses, address);
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flyktint dhcp6_lease_set_serverid(sd_dhcp6_lease *lease, const uint8_t *id,
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flyktint dhcp6_lease_get_serverid(sd_dhcp6_lease *lease, uint8_t **id, size_t *len) {
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flyktint dhcp6_lease_set_preference(sd_dhcp6_lease *lease, uint8_t preference) {
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flyktint dhcp6_lease_get_preference(sd_dhcp6_lease *lease, uint8_t *preference) {
ed6ee21953dac9c78383da00bc4514ece6b75ab5Patrik Flyktint dhcp6_lease_set_rapid_commit(sd_dhcp6_lease *lease) {
ed6ee21953dac9c78383da00bc4514ece6b75ab5Patrik Flyktint dhcp6_lease_get_rapid_commit(sd_dhcp6_lease *lease, bool *rapid_commit) {
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flyktint dhcp6_lease_get_iaid(sd_dhcp6_lease *lease, be32_t *iaid) {
e7504d95479455be5cef120fc8e0a48fd74ad5caPatrik Flyktint sd_dhcp6_lease_get_address(sd_dhcp6_lease *lease, struct in6_addr *addr,
ee3a5027f7c56df2ef47a774970433d7045c9e9fPatrik Flykt memcpy(addr, &lease->addr_iter->iaaddr.address,
ee3a5027f7c56df2ef47a774970433d7045c9e9fPatrik Flykt sizeof(struct in6_addr));
ee3a5027f7c56df2ef47a774970433d7045c9e9fPatrik Flykt be32toh(lease->addr_iter->iaaddr.lifetime_preferred);
ee3a5027f7c56df2ef47a774970433d7045c9e9fPatrik Flykt *lifetime_valid = be32toh(lease->addr_iter->iaaddr.lifetime_valid);
ea3b3a75abb3f8b853f7da454b9b8e258a120eeaPatrik Flykt lease->addr_iter = lease->addr_iter->addresses_next;
e7504d95479455be5cef120fc8e0a48fd74ad5caPatrik Flyktvoid sd_dhcp6_lease_reset_address_iter(sd_dhcp6_lease *lease) {
7bd8e95d44977833d0de3fc4e893eb3bc84351d6Patrik Flyktint dhcp6_lease_set_dns(sd_dhcp6_lease *lease, uint8_t *optval, size_t optlen) {
7bd8e95d44977833d0de3fc4e893eb3bc84351d6Patrik Flykt r = dhcp6_option_parse_ip6addrs(optval, optlen, &lease->dns,
7bd8e95d44977833d0de3fc4e893eb3bc84351d6Patrik Flykt if (r < 0) {
7bd8e95d44977833d0de3fc4e893eb3bc84351d6Patrik Flykt log_dhcp6_client(client, "Invalid DNS server option: %s",
7bd8e95d44977833d0de3fc4e893eb3bc84351d6Patrik Flyktint sd_dhcp6_lease_get_dns(sd_dhcp6_lease *lease, struct in6_addr **addrs) {
5da1b97f3c3d15521f2dcfbc18eccd6580122ebcPatrik Flyktint dhcp6_lease_set_domains(sd_dhcp6_lease *lease, uint8_t *optval,
5da1b97f3c3d15521f2dcfbc18eccd6580122ebcPatrik Flykt r = dhcp6_option_parse_domainname(optval, optlen, &domains);
5da1b97f3c3d15521f2dcfbc18eccd6580122ebcPatrik Flyktint sd_dhcp6_lease_get_domains(sd_dhcp6_lease *lease, char ***domains) {
52efd56a6369e19c2400a42981a197cd2eef924aLennart Poetteringint dhcp6_lease_set_ntp(sd_dhcp6_lease *lease, uint8_t *optval, size_t optlen) {
63a54aa15edee5ecadd894d2d5c73870d86e8ec4Zbigniew Jędrzejewski-Szmek lease->ntp = mfree(lease->ntp);
6599680e2d33597f0f11a99e1c3c957b42418568Patrik Flykt while ((r = dhcp6_option_parse(&optval, &optlen, &subopt, &sublen,
6599680e2d33597f0f11a99e1c3c957b42418568Patrik Flykt s = dhcp6_option_parse_ip6addrs(subval, sublen,
6599680e2d33597f0f11a99e1c3c957b42418568Patrik Flykt r = dhcp6_option_parse_domainname(subval, sublen,
41e4615d4f4f5c61afa84ba857f23c0ac496687bPatrik Flyktint dhcp6_lease_set_sntp(sd_dhcp6_lease *lease, uint8_t *optval, size_t optlen) {
41e4615d4f4f5c61afa84ba857f23c0ac496687bPatrik Flykt log_dhcp6_client(client, "NTP information already provided");
41e4615d4f4f5c61afa84ba857f23c0ac496687bPatrik Flykt log_dhcp6_client(client, "Using deprecated SNTP information");
41e4615d4f4f5c61afa84ba857f23c0ac496687bPatrik Flykt r = dhcp6_option_parse_ip6addrs(optval, optlen, &lease->ntp,
41e4615d4f4f5c61afa84ba857f23c0ac496687bPatrik Flykt if (r < 0) {
41e4615d4f4f5c61afa84ba857f23c0ac496687bPatrik Flykt log_dhcp6_client(client, "Invalid SNTP server option: %s",
6599680e2d33597f0f11a99e1c3c957b42418568Patrik Flyktint sd_dhcp6_lease_get_ntp_addrs(sd_dhcp6_lease *lease,
6599680e2d33597f0f11a99e1c3c957b42418568Patrik Flyktint sd_dhcp6_lease_get_ntp_fqdn(sd_dhcp6_lease *lease, char ***ntp_fqdn) {
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flyktsd_dhcp6_lease *sd_dhcp6_lease_ref(sd_dhcp6_lease *lease) {
3fb2c57038cf8dad396421989f43697fcf4ac4a4Patrik Flyktsd_dhcp6_lease *sd_dhcp6_lease_unref(sd_dhcp6_lease *lease) {
3733eec3e292e4ddb4cba5eb8d3bd8cbee7102d8Lennart Poettering lease->domains = strv_free(lease->domains);