/freebsd/sys/dev/acpica/Osd/ |
H A D | OsdInterrupt.c | 81 struct acpi_intr *ai; in acpi_intr_handler() local 83 ai = arg; in acpi_intr_handler() 84 KASSERT(ai != NULL && ai->ai_handler != NULL, in acpi_intr_handler() 86 if (ai->ai_handler(ai->ai_context) == ACPI_INTERRUPT_HANDLED) in acpi_intr_handler() 92 acpi_intr_destroy(device_t dev, struct acpi_intr *ai) in acpi_intr_destroy() argument 95 if (ai->ai_handle != NULL) in acpi_intr_destroy() 96 bus_teardown_intr(dev, ai->ai_irq, ai->ai_handle); in acpi_intr_destroy() 97 if (ai->ai_irq != NULL) in acpi_intr_destroy() 98 bus_release_resource(dev, SYS_RES_IRQ, ai->ai_rid, ai->ai_irq); in acpi_intr_destroy() 99 bus_delete_resource(dev, SYS_RES_IRQ, ai->ai_rid); in acpi_intr_destroy() [all …]
|
/freebsd/contrib/ntp/libntp/ |
H A D | ntp_rfc2553.c | 277 static int do_nodename (const char *nodename, struct addrinfo *ai, 286 struct addrinfo *ai = NULL; in getaddrinfo() local 298 ai = calloc(sizeof(struct addrinfo), 1); in getaddrinfo() 299 if (ai == NULL) in getaddrinfo() 306 ai->ai_flags = hints->ai_flags; in getaddrinfo() 307 ai->ai_family = hints->ai_family; in getaddrinfo() 308 ai->ai_socktype = hints->ai_socktype; in getaddrinfo() 309 ai->ai_protocol = hints->ai_protocol; in getaddrinfo() 368 rval = do_nodename(nodename, ai, hints); in getaddrinfo() 370 freeaddrinfo(ai); in getaddrinfo() [all …]
|
H A D | ntp_intres.c | 311 struct addrinfo * ai; in blocking_getaddrinfo() 358 ai = ai_res; in blocking_getaddrinfo() 359 while (NULL != ai) { in blocking_getaddrinfo() 361 if (ai->ai_canonname) in blocking_getaddrinfo() 362 canons_octets += strlen(ai->ai_canonname) + 1; in blocking_getaddrinfo() 363 ai = ai->ai_next; in blocking_getaddrinfo() 400 ai = ai_res; in blocking_getaddrinfo() 401 while (NULL != ai) { in blocking_getaddrinfo() 402 memcpy(cp, ai, sizeo in blocking_getaddrinfo() 317 struct addrinfo * ai; blocking_getaddrinfo() local 484 struct addrinfo * ai; getaddrinfo_sometime_complete() local [all...] |
/freebsd/lib/libc/tests/nss/ |
H A D | getaddrinfo_test.c | 146 free_addrinfo(struct addrinfo *ai) in free_addrinfo() argument 148 if (ai == NULL) in free_addrinfo() 151 free(ai->ai_addr); in free_addrinfo() 152 free(ai->ai_canonname); in free_addrinfo() 153 free_addrinfo(ai->ai_next); in free_addrinfo() 157 sdump_addrinfo(struct addrinfo *ai, char *buffer, size_t buflen) in sdump_addrinfo() argument 162 ai->ai_flags, ai->ai_family, ai->ai_socktype, ai->ai_protocol, in sdump_addrinfo() 163 ai->ai_addrlen); in sdump_addrinfo() 170 ai->ai_canonname == NULL ? "(null)" : ai->ai_canonname); in sdump_addrinfo() 176 if (ai->ai_addr == NULL) { in sdump_addrinfo() [all …]
|
/freebsd/contrib/ofed/librdmacm/ |
H A D | addrinfo.c | 48 static void ucma_convert_to_ai(struct addrinfo *ai, in ucma_convert_to_ai() argument 51 memset(ai, 0, sizeof(*ai)); in ucma_convert_to_ai() 53 ai->ai_flags = AI_PASSIVE; in ucma_convert_to_ai() 55 ai->ai_flags |= AI_NUMERICHOST; in ucma_convert_to_ai() 57 ai->ai_family = rai->ai_family; in ucma_convert_to_ai() 64 ai->ai_socktype = SOCK_STREAM; in ucma_convert_to_ai() 67 ai->ai_socktype = SOCK_DGRAM; in ucma_convert_to_ai() 73 ai->ai_protocol = IPPROTO_TCP; in ucma_convert_to_ai() 77 ai->ai_protocol = IPPROTO_UDP; in ucma_convert_to_ai() 80 if (ai->ai_socktype == SOCK_STREAM) in ucma_convert_to_ai() [all …]
|
/freebsd/usr.bin/finger/ |
H A D | net.c | 52 static int do_protocol(const char *name, const struct addrinfo *ai); 53 static void trying(const struct addrinfo *ai); 60 struct addrinfo *ai, *ai0; in netfinger() local 88 for (ai = ai0; ai != NULL; ai = ai->ai_next) { in netfinger() 90 trying(ai); in netfinger() 92 error = do_protocol(name, ai); in netfinger() 101 do_protocol(const char *name, const struct addrinfo *ai) in do_protocol() argument 111 s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); in do_protocol() 113 warn("socket(%d, %d, %d)", ai->ai_family, ai->ai_socktype, in do_protocol() 114 ai->ai_protocol); in do_protocol() [all …]
|
/freebsd/contrib/ntp/sntp/libevent/test/ |
H A D | regress_util.c | 850 ai_find_by_family(struct evutil_addrinfo *ai, int family) in ai_find_by_family() argument 852 while (ai) { in ai_find_by_family() 853 if (ai->ai_family == family) in ai_find_by_family() 854 return ai; in ai_find_by_family() 855 ai = ai->ai_next; in ai_find_by_family() 861 ai_find_by_protocol(struct evutil_addrinfo *ai, int protocol) in ai_find_by_protocol() argument 863 while (ai) { in ai_find_by_protocol() 864 if (ai->ai_protocol == protocol) in ai_find_by_protocol() 865 return ai; in ai_find_by_protocol() 866 ai = ai->ai_next; in ai_find_by_protocol() [all …]
|
/freebsd/contrib/libevent/test/ |
H A D | regress_util.c | 850 ai_find_by_family(struct evutil_addrinfo *ai, int family) in ai_find_by_family() argument 852 while (ai) { in ai_find_by_family() 853 if (ai->ai_family == family) in ai_find_by_family() 854 return ai; in ai_find_by_family() 855 ai = ai->ai_next; in ai_find_by_family() 861 ai_find_by_protocol(struct evutil_addrinfo *ai, int protocol) in ai_find_by_protocol() argument 863 while (ai) { in ai_find_by_protocol() 864 if (ai->ai_protocol == protocol) in ai_find_by_protocol() 865 return ai; in ai_find_by_protocol() 866 ai = ai->ai_next; in ai_find_by_protocol() [all …]
|
/freebsd/crypto/openssh/openbsd-compat/ |
H A D | fake-rfc2553.c | 110 freeaddrinfo(struct addrinfo *ai) in freeaddrinfo() argument 114 for(; ai != NULL;) { in freeaddrinfo() 115 next = ai->ai_next; in freeaddrinfo() 116 free(ai); in freeaddrinfo() 117 ai = next; in freeaddrinfo() 126 struct addrinfo *ai; in malloc_ai() local 128 ai = malloc(sizeof(*ai) + sizeof(struct sockaddr_in)); in malloc_ai() 129 if (ai == NULL) in malloc_ai() 132 memset(ai, '\0', sizeof(*ai) + sizeof(struct sockaddr_in)); in malloc_ai() 134 ai->ai_addr = (struct sockaddr *)(ai + 1); in malloc_ai() [all …]
|
/freebsd/contrib/ldns/compat/ |
H A D | fake-rfc2553.c | 107 freeaddrinfo(struct addrinfo *ai) in freeaddrinfo() argument 111 for(; ai != NULL;) { in freeaddrinfo() 112 next = ai->ai_next; in freeaddrinfo() 113 free(ai); in freeaddrinfo() 114 ai = next; in freeaddrinfo() 123 struct addrinfo *ai; in malloc_ai() local 125 ai = malloc(sizeof(*ai) + sizeof(struct sockaddr_in)); in malloc_ai() 126 if (ai == NULL) in malloc_ai() 129 memset(ai, '\0', sizeof(*ai) + sizeof(struct sockaddr_in)); in malloc_ai() 131 ai->ai_addr = (struct sockaddr *)(ai + 1); in malloc_ai() [all …]
|
/freebsd/sys/x86/isa/ |
H A D | atpic.c | 69 #define IMEN_MASK(ai) (IRQ_MASK((ai)->at_irq)) argument 93 #define IRQ(ap, ai) ((ap)->at_irqbase + (ai)->at_irq) argument 210 struct atpic_intsrc *ai; in atpic_register_sources() local 235 for (i = 0, ai = atintrs; i < NUM_ISA_IRQS; i++, ai++) { in atpic_register_sources() 238 intr_register_source(&ai->at_intsrc); in atpic_register_sources() 245 struct atpic_intsrc *ai = (struct atpic_intsrc *)isrc; in atpic_enable_source() local 249 if (ap->at_imen & IMEN_MASK(ai)) { in atpic_enable_source() 250 ap->at_imen &= ~IMEN_MASK(ai); in atpic_enable_source() 259 struct atpic_intsrc *ai = (struct atpic_intsrc *)isrc; in atpic_disable_source() local 263 if (ai->at_trigger != INTR_TRIGGER_EDGE) { in atpic_disable_source() [all …]
|
/freebsd/contrib/unbound/compat/ |
H A D | fake-rfc2553.c | 105 freeaddrinfo(struct addrinfo *ai) in freeaddrinfo() argument 109 for(; ai != NULL;) { in freeaddrinfo() 110 next = ai->ai_next; in freeaddrinfo() 111 free(ai); in freeaddrinfo() 112 ai = next; in freeaddrinfo() 121 struct addrinfo *ai; in malloc_ai() local 123 ai = calloc(1, sizeof(*ai) + sizeof(struct sockaddr_in)); in malloc_ai() 124 if (ai == NULL) in malloc_ai() 127 ai->ai_addr = (struct sockaddr *)(ai + 1); in malloc_ai() 129 ai->ai_addrlen = sizeof(struct sockaddr_in); in malloc_ai() [all …]
|
/freebsd/lib/libc/net/ |
H A D | getaddrinfo.c | 317 #define GET_AI(ai, afd, addr) \ argument 320 (ai) = get_ai(pai, (afd), (addr)); \ 321 if ((ai) == NULL) { \ 327 #define GET_PORT(ai, serv) \ argument 330 error = get_port((ai), (serv), 0); \ 335 #define GET_CANONNAME(ai, str) \ argument 338 error = get_canonname(pai, (ai), (str)); \ 357 freeaddrinfo(struct addrinfo *ai) in freeaddrinfo() argument 361 while (ai != NULL) { in freeaddrinfo() 362 next = ai->ai_next; in freeaddrinfo() [all …]
|
/freebsd/contrib/netbsd-tests/lib/libc/net/getaddrinfo/ |
H A D | h_gai.c | 45 struct addrinfo ai; variable 116 memset(&ai, 0, sizeof(ai)); in main() 117 ai.ai_family = PF_UNSPEC; in main() 118 ai.ai_flags |= AI_CANONNAME; in main() 122 ai.ai_socktype = SOCK_DGRAM; in main() 125 ai.ai_family = atoi(optarg); in main() 128 ai.ai_protocol = atoi(optarg); in main() 131 ai.ai_flags |= AI_PASSIVE; in main() 134 ai.ai_socktype = SOCK_RAW; in main() 137 ai.ai_socktype = atoi(optarg); in main() [all …]
|
/freebsd/usr.bin/getaddrinfo/ |
H A D | getaddrinfo.c | 262 struct addrinfo *ai; in printaddrinfo() local 267 for (ai = addrinfo; ai != NULL; ai = ai->ai_next) { in printaddrinfo() 269 if ((ai->ai_socktype >= 0) && in printaddrinfo() 270 ((size_t)ai->ai_socktype < __arraycount(socket_types)) && in printaddrinfo() 271 (socket_types[ai->ai_socktype] != NULL)) in printaddrinfo() 272 n = printf("%s", socket_types[ai->ai_socktype]); in printaddrinfo() 274 n = printf("%d", ai->ai_socktype); in printaddrinfo() 279 if ((ai->ai_family >= 0) && in printaddrinfo() 280 ((size_t)ai->ai_family < __arraycount(address_families)) && in printaddrinfo() 281 (address_families[ai->ai_family] != NULL)) in printaddrinfo() [all …]
|
/freebsd/crypto/openssl/crypto/bn/asm/ |
H A D | co-586.pl | 28 local($a,$ai,$b,$bi,$c0,$c1,$c2,$pos,$i,$na,$nb)=@_; 33 &comment("mul a[$ai]*b[$bi]"); 56 local($r,$a,$ai,$bi,$c0,$c1,$c2,$pos,$i,$na,$nb)=@_; 61 &comment("sqr a[$ai]*a[$bi]"); 67 if ($ai == $bi) 85 local($r,$a,$ai,$bi,$c0,$c1,$c2,$pos,$i,$na,$nb)=@_; 90 &comment("sqr a[$ai]*a[$bi]"); 96 if ($ai == $bi) 119 local($i,$as,$ae,$bs,$be,$ai,$bi); 150 $ai=$as; [all …]
|
/freebsd/crypto/heimdal/lib/roken/ |
H A D | freeaddrinfo.c | 43 freeaddrinfo(struct addrinfo *ai) in freeaddrinfo() argument 47 while(ai != NULL) { in freeaddrinfo() 48 free (ai->ai_canonname); in freeaddrinfo() 49 free (ai->ai_addr); in freeaddrinfo() 50 tofree = ai; in freeaddrinfo() 51 ai = ai->ai_next; in freeaddrinfo()
|
/freebsd/crypto/heimdal/lib/krb5/ |
H A D | expand_hostname.c | 71 struct addrinfo *ai, *a, hints; in krb5_expand_hostname() local 80 error = getaddrinfo (orig_hostname, NULL, &hints, &ai); in krb5_expand_hostname() 83 for (a = ai; a != NULL; a = a->ai_next) { in krb5_expand_hostname() 86 freeaddrinfo (ai); in krb5_expand_hostname() 96 freeaddrinfo (ai); in krb5_expand_hostname() 149 struct addrinfo *ai, *a, hints; in krb5_expand_hostname_realms() local 160 error = getaddrinfo (orig_hostname, NULL, &hints, &ai); in krb5_expand_hostname_realms() 165 for (a = ai; a != NULL; a = a->ai_next) { in krb5_expand_hostname_realms() 169 freeaddrinfo (ai); in krb5_expand_hostname_realms() 175 freeaddrinfo (ai); in krb5_expand_hostname_realms() [all …]
|
/freebsd/usr.sbin/lpr/common_source/ |
H A D | net.c | 89 struct addrinfo hints, *res, *ai; in getport() local 112 ai = res; in getport() 115 s = rresvport_af(&lport, ai->ai_family); in getport() 119 if (ai->ai_next) { in getport() 120 ai = ai->ai_next; in getport() 127 ai = res; in getport() 134 if (connect(s, ai->ai_addr, ai->ai_addrlen) < 0) { in getport() 151 if (ai->ai_next != NULL) { in getport() 152 ai = ai->ai_next; in getport() 159 ai = res; in getport()
|
/freebsd/crypto/openssl/crypto/x509/ |
H A D | v3_tlsf.c | 66 ASN1_INTEGER *ai; in STACK_OF() local 69 ai = sk_ASN1_INTEGER_value(tls_feature, i); in STACK_OF() 70 tlsextid = ASN1_INTEGER_get(ai); in STACK_OF() 77 X509V3_add_value_int(NULL, ai, &ext_list); in STACK_OF() 92 ASN1_INTEGER *ai = NULL; in v2i_TLS_FEATURE() local 125 if ((ai = ASN1_INTEGER_new()) == NULL in v2i_TLS_FEATURE() 126 || !ASN1_INTEGER_set(ai, tlsextid) in v2i_TLS_FEATURE() 127 || sk_ASN1_INTEGER_push(tlsf, ai) <= 0) { in v2i_TLS_FEATURE() 132 ai = NULL; in v2i_TLS_FEATURE() 138 ASN1_INTEGER_free(ai); in v2i_TLS_FEATURE()
|
/freebsd/sys/dev/sound/pcm/ |
H A D | dsp.c | 1965 dsp_oss_audioinfo_unavail(oss_audioinfo *ai, int unit) in dsp_oss_audioinfo_unavail() argument 1967 bzero(ai, sizeof(*ai)); in dsp_oss_audioinfo_unavail() 1968 ai->dev = unit; in dsp_oss_audioinfo_unavail() 1969 snprintf(ai->name, sizeof(ai->name), "pcm%d (unavailable)", unit); in dsp_oss_audioinfo_unavail() 1970 ai->pid = -1; in dsp_oss_audioinfo_unavail() 1971 strlcpy(ai->cmd, CHN_COMM_UNUSED, sizeof(ai->cmd)); in dsp_oss_audioinfo_unavail() 1972 ai->card_number = unit; in dsp_oss_audioinfo_unavail() 1973 ai->port_number = unit; in dsp_oss_audioinfo_unavail() 1974 ai->mixer_dev = -1; in dsp_oss_audioinfo_unavail() 1975 ai->legacy_device = unit; in dsp_oss_audioinfo_unavail() [all …]
|
/freebsd/contrib/netbsd-tests/net/mcast/ |
H A D | mcast.c | 91 addmc(int s, struct addrinfo *ai, bool bug) in addmc() argument 99 switch (ai->ai_family) { in addmc() 101 s4 = (void *)ai->ai_addr; in addmc() 102 assert(sizeof(*s4) == ai->ai_addrlen); in addmc() 108 s6 = (void *)ai->ai_addr; in addmc() 126 assert(sizeof(*s6) == ai->ai_addrlen); in addmc() 155 allowv4mapped(int s, struct addrinfo *ai) in allowv4mapped() argument 160 if (ai->ai_family != AF_INET6) in allowv4mapped() 163 s6 = (void *)ai->ai_addr; in allowv4mapped() 192 struct addrinfo hints, *ai0, *ai; in getsocket() local [all …]
|
/freebsd/contrib/libpcap/ |
H A D | nametoaddr.c | 326 struct addrinfo hints, *res, *ai; in pcap_nametoport() local 358 for (ai = res; ai != NULL; ai = ai->ai_next) { in pcap_nametoport() 362 if (ai->ai_addr != NULL) { in pcap_nametoport() 366 if (ai->ai_addr->sa_family == AF_INET) { in pcap_nametoport() 367 in4 = (struct sockaddr_in *)ai->ai_addr; in pcap_nametoport() 372 if (ai->ai_addr->sa_family == AF_INET6) { in pcap_nametoport() 373 in6 = (struct sockaddr_in6 *)ai->ai_addr; in pcap_nametoport() 402 for (ai = res; ai != NULL; ai = ai->ai_next) { in pcap_nametoport() 406 if (ai->ai_addr != NULL) { in pcap_nametoport() 410 if (ai->ai_addr->sa_family == AF_INET) { in pcap_nametoport() [all …]
|
/freebsd/crypto/openssh/ |
H A D | addr.c | 378 struct addrinfo hints, *ai; in addr_pton() local 383 if (p == NULL || getaddrinfo(p, NULL, &hints, &ai) != 0) in addr_pton() 386 if (ai == NULL) in addr_pton() 389 if (ai->ai_addr == NULL) { in addr_pton() 390 freeaddrinfo(ai); in addr_pton() 394 if (n != NULL && addr_sa_to_xaddr(ai->ai_addr, ai->ai_addrlen, in addr_pton() 396 freeaddrinfo(ai); in addr_pton() 400 freeaddrinfo(ai); in addr_pton() 407 struct addrinfo hints, *ai; in addr_sa_pton() local 412 if (h == NULL || getaddrinfo(h, s, &hints, &ai) != 0) in addr_sa_pton() [all …]
|
/freebsd/contrib/nvi/ex/ |
H A D | ex_txt.c | 185 if (LF_ISSET(TXT_DOTTERM) && tp->len == tp->ai + 1 && in ex_txt() 209 OOBLNO, &ait, ait.ai, ntp)) in ex_txt() 228 if (tp->len <= tp->ai && LF_ISSET(TXT_AUTOINDENT)) in ex_txt() 232 if (tp->len <= tp->ai && LF_ISSET(TXT_AUTOINDENT)) in ex_txt() 284 if (tp->len > tp->ai + 1) in ex_txt() 290 BINC_GOTOW(sp, ait.lb, ait.lb_len, tp->ai); in ex_txt() 291 MEMCPY(ait.lb, tp->lb, tp->ai); in ex_txt() 292 ait.ai = ait.len = tp->ai; in ex_txt() 298 if (tp->len > tp->ai + 1) in ex_txt() 303 tp->ai = tp->len = 0; in ex_txt() [all …]
|