Home | History | Annotate | Download | only in ServiceRegistration

Lines Matching defs:towire

469 route_information_to_wire(dns_towire_state_t *towire, void *prefix_data,
477 dns_u8_to_wire(towire, ND_OPT_ROUTE_INFORMATION);
478 dns_u8_to_wire(towire, 2); // length / 8
479 dns_u8_to_wire(towire, 64); // Interface prefixes are always 64 bits
480 dns_u8_to_wire(towire, 0); // There's no reason at present to prefer one Thread BR over another
481 dns_u32_to_wire(towire, BR_PREFIX_LIFETIME); // Route lifetime 1800 seconds (30 minutes)
482 dns_rdata_raw_data_to_wire(towire, prefix, 8); // /64 requires 8 bytes.
567 dns_towire_state_t towire;
587 memset(&towire, 0, sizeof towire);
588 towire.p = message;
589 towire.lim = message + MAX_ICMP_MESSAGE;
593 // the towire functions more generic.
594 dns_u8_to_wire(&towire, ND_ROUTER_ADVERT); // icmp6_type
595 dns_u8_to_wire(&towire, 0); // icmp6_code
596 dns_u16_to_wire(&towire, 0); // The kernel computes the checksum (we don't technically have it).
597 dns_u8_to_wire(&towire, 0); // Hop limit, we don't set.
598 dns_u8_to_wire(&towire, 0); // Flags. We don't offer DHCP, so We set neither the M nor the O bit.
601 dns_u16_to_wire(&towire, BR_PREFIX_LIFETIME); // Router lifetime, hacked. This shouldn't ever be enabled.
606 dns_u16_to_wire(&towire, BR_PREFIX_LIFETIME); // Router lifetime for default route
609 dns_u16_to_wire(&towire, 0); // Router lifetime for non-default default route(s).
614 dns_u32_to_wire(&towire, 0); // Reachable time for NUD, we have no opinion on this.
615 dns_u32_to_wire(&towire, 0); // Retransmission timer, again we have no opinion.
620 dns_u8_to_wire(&towire, ND_OPT_MTU);
621 dns_u8_to_wire(&towire, 1); // length / 8
622 dns_u32_to_wire(&towire, 1280);
629 dns_u8_to_wire(&towire, ND_OPT_PREFIX_INFORMATION);
630 dns_u8_to_wire(&towire, 4); // length / 8
631 dns_u8_to_wire(&towire, 64); // On-link prefix is always 64 bits
632 dns_u8_to_wire(&towire, ND_OPT_PI_FLAG_ONLINK | ND_OPT_PI_FLAG_AUTO); // On link, autoconfig
633 dns_u32_to_wire(&towire, interface->valid_lifetime);
634 dns_u32_to_wire(&towire, interface->preferred_lifetime);
635 dns_u32_to_wire(&towire, 0); // Reserved
636 dns_rdata_raw_data_to_wire(&towire, &interface->ipv6_prefix, sizeof interface->ipv6_prefix);
678 route_information_to_wire(&towire, &ifroute->ipv6_prefix, ifroute->name, interface->name);
690 route_information_to_wire(&towire, &prefix->prefix, route_state->thread_interface_name, interface->name);
696 dns_u8_to_wire(&towire, ND_OPT_ROUTE_INFORMATION);
697 dns_u8_to_wire(&towire, 3); // length / 8
698 dns_u8_to_wire(&towire, 48); // ULA prefixes are always 48 bits
699 dns_u8_to_wire(&towire, 0); // There's no reason at present to prefer one Thread BR over another
700 dns_u32_to_wire(&towire, BR_PREFIX_LIFETIME); // Route lifetime 1800 seconds (30 minutes)
701 dns_rdata_raw_data_to_wire(&towire, &route_state->srp_server->ula_prefix, 16); // /48 requires 16 bytes
706 dns_u8_to_wire(&towire, ND_OPT_RA_FLAGS_EXTENSION);
707 dns_u8_to_wire(&towire, 1); // length / 8
708 dns_u8_to_wire(&towire, RA_FLAGS1_STUB_ROUTER);
709 dns_u8_to_wire(&towire, 0); // Five bytes of zero flag bits
710 dns_u32_to_wire(&towire, 0);
714 dns_u8_to_wire(&towire, ND_OPT_SOURCE_LINKADDR);
715 dns_u8_to_wire(&towire, 1); // length / 8
716 dns_rdata_raw_data_to_wire(&towire, &interface->link_layer, sizeof(interface->link_layer));
719 if (towire.error) {
720 ERROR("No space in ICMP output buffer for " PUB_S_SRP " at route.c:%d", interface->name, towire.line);
721 towire.error = 0;
727 icmp_send(message, towire.p - message, interface, destination);
736 dns_towire_state_t towire;
754 memset(&towire, 0, sizeof towire);
755 towire.p = message;
756 towire.lim = message + MAX_ICMP_MESSAGE;
760 // the towire functions more generic.
761 dns_u8_to_wire(&towire, ND_ROUTER_SOLICIT); // icmp6_type
762 dns_u8_to_wire(&towire, 0); // icmp6_code
763 dns_u16_to_wire(&towire, 0); // The kernel computes the checksum (we don't technically have it).
764 dns_u32_to_wire(&towire, 0); // Reserved32
768 dns_u8_to_wire(&towire, ND_OPT_SOURCE_LINKADDR);
769 dns_u8_to_wire(&towire, 1); // length / 8
770 dns_rdata_raw_data_to_wire(&towire, &interface->link_layer, sizeof(interface->link_layer));
773 if (towire.error) {
774 ERROR("No space in ICMP output buffer for " PUB_S_SRP " at route.c:%d", interface->name, towire.line);
782 icmp_send(message, towire.p - message, interface, &in6addr_linklocal_allrouters);
791 dns_towire_state_t towire;
801 memset(&towire, 0, sizeof towire);
802 towire.p = message;
803 towire.lim = message + MAX_ICMP_MESSAGE;
807 // the towire functions more generic.
808 dns_u8_to_wire(&towire, ND_NEIGHBOR_SOLICIT); // icmp6_type
809 dns_u8_to_wire(&towire, 0); // icmp6_code
810 dns_u16_to_wire(&towire, 0); // The kernel computes the checksum (we don't technically have it).
811 dns_u32_to_wire(&towire, 0); // Reserved32
812 dns_rdata_raw_data_to_wire(&towire, destination, sizeof(*destination)); // Target address of solicit
816 dns_u8_to_wire(&towire, ND_OPT_SOURCE_LINKADDR);
817 dns_u8_to_wire(&towire, 1); // length / 8
818 dns_rdata_raw_data_to_wire(&towire
821 if (towire.error) {
822 ERROR("No space in ICMP output buffer for " PUB_S_SRP " at route.c:%d", interface->name, towire.line);
832 icmp_send(message, towire.p - message, interface, destination);