Lines Matching refs:proto
85 + DNS_LABEL_LEN_SIZE + strlen(ref->proto) in service_proto_size()
222 static bool proto_is_valid(const char *proto) in proto_is_valid() argument
226 if (proto == NULL) { in proto_is_valid()
231 proto_size = strlen(proto); in proto_is_valid()
234 proto, proto_size, DNS_SD_PROTO_SIZE); in proto_is_valid()
238 if (!(strncasecmp("_tcp", proto, DNS_SD_PROTO_SIZE) == 0 || in proto_is_valid()
239 strncasecmp("_udp", proto, DNS_SD_PROTO_SIZE) == 0)) { in proto_is_valid()
242 proto); in proto_is_valid()
293 && proto_is_valid(inst->proto) in rec_is_valid()
367 inst->proto, in add_ptr_record()
649 static bool port_in_use_sockaddr(uint16_t proto, uint16_t port, in port_in_use_sockaddr() argument
666 net_context_port_in_use(proto, port, addr) in port_in_use_sockaddr()
667 || net_context_port_in_use(proto, port, anyp); in port_in_use_sockaddr()
670 static bool port_in_use(uint16_t proto, uint16_t port, in port_in_use() argument
682 ret = port_in_use_sockaddr(proto, port, in port_in_use()
695 ret = port_in_use_sockaddr(proto, port, in port_in_use()
706 static inline bool port_in_use(uint16_t proto, uint16_t port, const struct in_addr *addr4, in port_in_use() argument
738 uint16_t proto; in dns_sd_handle_ptr_query() local
752 ntohs(*(inst->port)), inst->instance, inst->service, inst->proto, in dns_sd_handle_ptr_query()
757 if (strncmp("_tcp", inst->proto, DNS_SD_PROTO_SIZE) == 0) { in dns_sd_handle_ptr_query()
758 proto = IPPROTO_TCP; in dns_sd_handle_ptr_query()
759 } else if (strncmp("_udp", inst->proto, DNS_SD_PROTO_SIZE) == 0) { in dns_sd_handle_ptr_query()
760 proto = IPPROTO_UDP; in dns_sd_handle_ptr_query()
762 NET_DBG("invalid protocol %s", inst->proto); in dns_sd_handle_ptr_query()
766 if (!port_in_use(proto, ntohs(*(inst->port)), addr4, addr6)) { in dns_sd_handle_ptr_query()
837 uint16_t proto; in dns_sd_handle_service_type_enum() local
851 ntohs(*(inst->port)), inst->instance, inst->service, inst->proto, in dns_sd_handle_service_type_enum()
856 if (strncmp("_tcp", inst->proto, DNS_SD_PROTO_SIZE) == 0) { in dns_sd_handle_service_type_enum()
857 proto = IPPROTO_TCP; in dns_sd_handle_service_type_enum()
858 } else if (strncmp("_udp", inst->proto, DNS_SD_PROTO_SIZE) == 0) { in dns_sd_handle_service_type_enum()
859 proto = IPPROTO_UDP; in dns_sd_handle_service_type_enum()
861 NET_DBG("invalid protocol %s", inst->proto); in dns_sd_handle_service_type_enum()
865 if (!port_in_use(proto, ntohs(*(inst->port)), addr4, addr6)) { in dns_sd_handle_service_type_enum()
905 memcpy(&buf[offset], inst->proto, DNS_SD_PROTO_SIZE); in dns_sd_handle_service_type_enum()
955 record->proto, filter->proto, in dns_sd_rec_match()
1088 record->proto = label[1]; in dns_sd_query_extract()
1096 if (!proto_is_valid(record->proto)) { in dns_sd_query_extract()
1097 NET_DBG("proto '%s' is invalid", record->proto); in dns_sd_query_extract()
1115 record->proto = label[2]; in dns_sd_query_extract()
1128 if (!proto_is_valid(record->proto)) { in dns_sd_query_extract()
1129 NET_DBG("proto '%s' is invalid", record->proto); in dns_sd_query_extract()
1147 .proto = "_udp", in dns_sd_is_service_type_enumeration()