Lines Matching refs:n

81 	int n, i, soanum, multiline;  in res_nmkupdate()  local
178 if ((n = dn_comp(rrecp->r_dname, cp, buflen, dnptrs, in res_nmkupdate()
181 cp += n; in res_nmkupdate()
182 ShrinkBuffer(n + 2*INT16SZ); in res_nmkupdate()
224 n = dn_comp(buf2, cp, buflen, dnptrs, lastdnptr); in res_nmkupdate()
225 if (n < 0) in res_nmkupdate()
227 cp += n; in res_nmkupdate()
228 ShrinkBuffer(n); in res_nmkupdate()
237 n = dn_comp(buf2, cp, buflen, in res_nmkupdate()
239 if (n < 0) in res_nmkupdate()
241 cp += n; in res_nmkupdate()
242 ShrinkBuffer(n); in res_nmkupdate()
271 n = getnum_str(&startp, endp); in res_nmkupdate()
272 if (n < 0) in res_nmkupdate()
275 PUTSHORT(n, cp); in res_nmkupdate()
278 n = dn_comp(buf2, cp, buflen, dnptrs, lastdnptr); in res_nmkupdate()
279 if (n < 0) in res_nmkupdate()
281 cp += n; in res_nmkupdate()
282 ShrinkBuffer(n); in res_nmkupdate()
285 n = getnum_str(&startp, endp); in res_nmkupdate()
286 if (n < 0) in res_nmkupdate()
289 PUTSHORT(n, cp); in res_nmkupdate()
291 n = getnum_str(&startp, endp); in res_nmkupdate()
292 if (n < 0) in res_nmkupdate()
295 PUTSHORT(n, cp); in res_nmkupdate()
297 n = getnum_str(&startp, endp); in res_nmkupdate()
298 if (n < 0) in res_nmkupdate()
301 PUTSHORT(n, cp); in res_nmkupdate()
305 n = dn_comp(buf2, cp, buflen, NULL, NULL); in res_nmkupdate()
306 if (n < 0) in res_nmkupdate()
308 cp += n; in res_nmkupdate()
309 ShrinkBuffer(n); in res_nmkupdate()
312 n = getnum_str(&startp, endp); in res_nmkupdate()
313 if (n < 0) in res_nmkupdate()
315 PUTSHORT(n, cp); in res_nmkupdate()
321 n = dn_comp(buf2, cp, buflen, dnptrs, in res_nmkupdate()
323 if (n < 0) in res_nmkupdate()
325 cp += n; in res_nmkupdate()
326 ShrinkBuffer(n); in res_nmkupdate()
352 if ((n = res_servicenumber(buf2)) <= 0) in res_nmkupdate()
355 if (n < MAXPORT) { in res_nmkupdate()
356 bm[n/8] |= (0x80>>(n%8)); in res_nmkupdate()
357 if ((unsigned)n > maxbm) in res_nmkupdate()
358 maxbm = n; in res_nmkupdate()
370 if ((n = getstr_str(buf2, sizeof buf2, in res_nmkupdate()
373 if (n > 255) in res_nmkupdate()
375 ShrinkBuffer(n+1); in res_nmkupdate()
376 *cp++ = n; in res_nmkupdate()
377 memcpy(cp, buf2, n); in res_nmkupdate()
378 cp += n; in res_nmkupdate()
383 if ((n = getstr_str(buf2, sizeof buf2, in res_nmkupdate()
389 if (n > 255) in res_nmkupdate()
391 ShrinkBuffer(n+1); in res_nmkupdate()
392 *cp++ = n; in res_nmkupdate()
393 memcpy(cp, buf2, n); in res_nmkupdate()
394 cp += n; in res_nmkupdate()
399 if ((n = getstr_str(buf2, sizeof buf2, &startp, in res_nmkupdate()
402 if (n > 255) in res_nmkupdate()
404 ShrinkBuffer(n+1); in res_nmkupdate()
405 *cp++ = n; in res_nmkupdate()
406 memcpy(cp, buf2, n); in res_nmkupdate()
407 cp += n; in res_nmkupdate()
411 if ((n = getstr_str(buf2, sizeof buf2, &startp, in res_nmkupdate()
414 if ((n > 255) || (n == 0)) in res_nmkupdate()
416 ShrinkBuffer(n+1); in res_nmkupdate()
417 *cp++ = n; in res_nmkupdate()
418 memcpy(cp, buf2, n); in res_nmkupdate()
419 cp += n; in res_nmkupdate()
420 if ((n = getstr_str(buf2, sizeof buf2, &startp, in res_nmkupdate()
422 n = 0; in res_nmkupdate()
423 if (n > 255) in res_nmkupdate()
425 ShrinkBuffer(n+1); in res_nmkupdate()
426 *cp++ = n; in res_nmkupdate()
427 memcpy(cp, buf2, n); in res_nmkupdate()
428 cp += n; in res_nmkupdate()
431 if ((n = inet_nsap_addr((char *)startp, (u_char *)buf2, sizeof(buf2))) != 0) { in res_nmkupdate()
432 ShrinkBuffer(n); in res_nmkupdate()
433 memcpy(cp, buf2, n); in res_nmkupdate()
434 cp += n; in res_nmkupdate()
440 if ((n = loc_aton((char *)startp, (u_char *)buf2)) != 0) { in res_nmkupdate()
441 ShrinkBuffer(n); in res_nmkupdate()
442 memcpy(cp, buf2, n); in res_nmkupdate()
443 cp += n; in res_nmkupdate()
453 if ((n = getword_str(buf2, sizeof buf2, in res_nmkupdate()
462 n = getnum_str(&startp, endp); in res_nmkupdate()
463 if (n < 0) in res_nmkupdate()
466 *cp++ = n; in res_nmkupdate()
468 n = getnum_str(&startp, endp); in res_nmkupdate()
469 if (n <= 0 || n > 255) in res_nmkupdate()
472 *cp++ = n; in res_nmkupdate()
513 n = getnum_str(&startp, endp); in res_nmkupdate()
514 if (n < 0) in res_nmkupdate()
517 PUTSHORT(n, cp); in res_nmkupdate()
521 n = dn_comp(buf2, cp, buflen, dnptrs, lastdnptr); in res_nmkupdate()
522 if (n < 0) in res_nmkupdate()
524 cp += n; in res_nmkupdate()
525 ShrinkBuffer(n); in res_nmkupdate()
527 if ((n = getword_str(buf2, sizeof buf2, in res_nmkupdate()
540 n = gethexnum_str(&startp, endp); in res_nmkupdate()
541 if (n < 0) in res_nmkupdate()
544 PUTSHORT(n, cp); in res_nmkupdate()
546 n = getnum_str(&startp, endp); in res_nmkupdate()
547 if (n < 0) in res_nmkupdate()
550 *cp++ = n; in res_nmkupdate()
552 n = getnum_str(&startp, endp); in res_nmkupdate()
553 if (n < 0) in res_nmkupdate()
556 *cp++ = n; in res_nmkupdate()
558 if ((n = getword_str(buf2, sizeof buf2, in res_nmkupdate()
577 n = dn_comp(buf2, cp, buflen, NULL, NULL); in res_nmkupdate()
578 if (n < 0) in res_nmkupdate()
580 cp += n; in res_nmkupdate()
581 ShrinkBuffer(n); in res_nmkupdate()
596 n = maxtype/NS_NXT_BITS+1; in res_nmkupdate()
597 ShrinkBuffer(n); in res_nmkupdate()
598 memcpy(cp, data, n); in res_nmkupdate()
599 cp += n; in res_nmkupdate()
604 n = getnum_str(&startp, endp); in res_nmkupdate()
605 if (n < 0) in res_nmkupdate()
608 PUTSHORT(n, cp); in res_nmkupdate()
610 n = getnum_str(&startp, endp); in res_nmkupdate()
611 if (n < 0) in res_nmkupdate()
614 PUTSHORT(n, cp); in res_nmkupdate()
616 n = getnum_str(&startp, endp); in res_nmkupdate()
617 if (n < 0) in res_nmkupdate()
620 *cp++ = n; in res_nmkupdate()
622 if ((n = getword_str(buf2, sizeof buf2, in res_nmkupdate()
644 n = getnum_str(&startp, endp); in res_nmkupdate()
645 if (n < 0 || n > 65535) in res_nmkupdate()
648 PUTSHORT(n, cp); in res_nmkupdate()
650 n = getnum_str(&startp, endp); in res_nmkupdate()
651 if (n < 0 || n > 65535) in res_nmkupdate()
654 PUTSHORT(n, cp); in res_nmkupdate()
656 if ((n = getstr_str(buf2, sizeof buf2, in res_nmkupdate()
660 if (n > 255) in res_nmkupdate()
662 ShrinkBuffer(n+1); in res_nmkupdate()
663 *cp++ = n; in res_nmkupdate()
664 memcpy(cp, buf2, n); in res_nmkupdate()
665 cp += n; in res_nmkupdate()
667 if ((n = getstr_str(buf2, sizeof buf2, in res_nmkupdate()
671 if (n > 255) in res_nmkupdate()
673 ShrinkBuffer(n+1); in res_nmkupdate()
674 *cp++ = n; in res_nmkupdate()
675 memcpy(cp, buf2, n); in res_nmkupdate()
676 cp += n; in res_nmkupdate()
678 if ((n = getstr_str(buf2, sizeof buf2, in res_nmkupdate()
682 if (n > 255) in res_nmkupdate()
684 ShrinkBuffer(n+1); in res_nmkupdate()
685 *cp++ = n; in res_nmkupdate()
686 memcpy(cp, buf2, n); in res_nmkupdate()
687 cp += n; in res_nmkupdate()
691 n = dn_comp(buf2, cp, buflen, NULL, NULL); in res_nmkupdate()
692 if (n < 0) in res_nmkupdate()
694 cp += n; in res_nmkupdate()
695 ShrinkBuffer(n); in res_nmkupdate()
700 n = (u_int16_t)((cp - sp2) - INT16SZ); in res_nmkupdate()
701 PUTSHORT(n, sp2); in res_nmkupdate()
826 int c, n; in gethexnum_str() local
833 for (n = 0; *startpp <= endp; ) { in gethexnum_str()
860 n = n * 16 + (c - '0'); in gethexnum_str()
862 n = n * 16 + (tolower(c) - 'a' + 10); in gethexnum_str()
865 return (n + m); in gethexnum_str()
874 int c, n; in getnum_str() local
878 for (n = 0; *startpp <= endp; ) { in getnum_str()
904 n = n * 10 + (c - '0'); in getnum_str()
907 return (n + m); in getnum_str()
1041 int n; in findservice() local
1055 if (sscanf(s, "%d", &n) != 1 || n <= 0) in findservice()
1056 n = -1; in findservice()
1057 return (n); in findservice()