Lines Matching refs:ptr

122 static void dump(unsigned char *ptr, int i, int indent) {  in dump()  argument
125 fprintf(stderr, "%2.2x ", *ptr++); in dump()
270 char *ptr, *ptr2; in acn_parse_hosts_file() local
288 ptr = buf + pos; /* and skip over any of that leading whitespace */ in acn_parse_hosts_file()
290 …if ((ptr2 = strstr(ptr, "_I_")) == NULL) /* skip any lines that don't have names that look like t… in acn_parse_hosts_file()
294 …*(ptr + strcspn(ptr, " \t")) = '\0'; /* null terminate the IP address so its a standalone string… in acn_parse_hosts_file()
303 ptr2 = strdup(ptr); /* copy the IP address into our malloc'ed memory */ in acn_parse_hosts_file()
571 char *ptr; in process_client_data() local
584 ptr = u->imsg; /* point to the start of the msg for this IOP */ in process_client_data()
585 while (ptr < (u->imsg + u->len)) { in process_client_data()
595 if (*ptr) { /* if there is a count for the name */ in process_client_data()
596 if ((iff->name = malloc(*ptr + 1)) == NULL) { /* get that amount of space */ in process_client_data()
602 memcpy(iff->name, (ptr + 1), *ptr); /* copy the name into the malloc'ed space */ in process_client_data()
603 *(iff->name + *ptr) = 0; /* and null terminate the string */ in process_client_data()
604ptr += *ptr; /* now move the pointer forwards by the length of the count plus the length… in process_client_data()
606 ptr++; in process_client_data()
608 if (*ptr) { /* if there is a count for the description */ in process_client_data()
609 if ((iff->description = malloc(*ptr + 1)) == NULL) { /* get that amount of space */ in process_client_data()
615 memcpy(iff->description, (ptr + 1), *ptr); /* copy the name into the malloc'ed space */ in process_client_data()
616 *(iff->description + *ptr) = 0; /* and null terminate the string */ in process_client_data()
617ptr += *ptr; /* now move the pointer forwards by the length of the count plus the length… in process_client_data()
619 ptr++; in process_client_data()
621 interfaceType = ntohl(*(bpf_u_int32 *)ptr); in process_client_data()
622 ptr += 4; /* skip over the interface type */ in process_client_data()
624 flags = *ptr++; in process_client_data()
627 address_count = *ptr++; in process_client_data()
640 if (*ptr) { /* if there is a count for the address */ in process_client_data()
650 s->sin_addr.s_addr = *(bpf_u_int32 *)(ptr + 1); /* copy the address in */ in process_client_data()
651ptr += *ptr; /* now move the pointer forwards according to the specified length of the ad… in process_client_data()
653 ptr++; /* then forwards one more for the 'length of the address' field */ in process_client_data()
654 if (*ptr) { /* process any netmask */ in process_client_data()
666 s->sin_addr.s_addr = *(bpf_u_int32*)(ptr + 1); in process_client_data()
667 ptr += *ptr; in process_client_data()
669 ptr++; in process_client_data()
670 if (*ptr) { /* process any broadcast address */ in process_client_data()
682 s->sin_addr.s_addr = *(bpf_u_int32*)(ptr + 1); in process_client_data()
683 ptr += *ptr; in process_client_data()
685 ptr++; in process_client_data()
686 if (*ptr) { /* process any destination address */ in process_client_data()
698 s->sin_addr.s_addr = *(bpf_u_int32*)(ptr + 1); in process_client_data()
699 ptr += *ptr; in process_client_data()
701 ptr++; in process_client_data()