Lines Matching full:addr

226   char addr[sizeof ((struct cbcp_data *)0)->addr_start - 1];	/* ASCIIZ */  member
235 struct cbcp_addr *addr; in cbcp_data_Show() local
238 addr = (struct cbcp_addr *)data->addr_start; in cbcp_data_Show()
245 while (addr->addr < end) { in cbcp_data_Show()
246 if (addr->type == CBCP_ADDR_PSTN) in cbcp_data_Show()
247 log_Printf(LogCBCP, " ADDR %s\n", addr->addr); in cbcp_data_Show()
249 log_Printf(LogCBCP, " ADDR type %d ??\n", (int)addr->type); in cbcp_data_Show()
250 addr = (struct cbcp_addr *)(addr->addr + strlen(addr->addr) + 1); in cbcp_data_Show()
259 struct cbcp_addr *addr; in cbcp_SendReq() local
274 addr = (struct cbcp_addr *)data.addr_start; in cbcp_SendReq()
275 addr->type = CBCP_ADDR_PSTN; in cbcp_SendReq()
276 *addr->addr = '\0'; in cbcp_SendReq()
277 data.length = addr->addr - (char *)&data; in cbcp_SendReq()
281 addr = (struct cbcp_addr *)data.addr_start; in cbcp_SendReq()
284 max = data.addr_start + sizeof data.addr_start - addr->addr - 1; in cbcp_SendReq()
286 addr->type = CBCP_ADDR_PSTN; in cbcp_SendReq()
287 strncpy(addr->addr, next, sizeof addr->addr - 1); in cbcp_SendReq()
288 addr->addr[sizeof addr->addr - 1] = '\0'; in cbcp_SendReq()
289 addr = (struct cbcp_addr *)((char *)addr + len + 2); in cbcp_SendReq()
291 log_Printf(LogWARN, "CBCP ADDR \"%s\" skipped - packet too large\n", in cbcp_SendReq()
294 data.length = (char *)addr - (char *)&data; in cbcp_SendReq()
359 struct cbcp_addr *addr; in cbcp_AdjustResponse() local
388 addr = (struct cbcp_addr *)data->addr_start; in cbcp_AdjustResponse()
389 if (addr->type != CBCP_ADDR_PSTN) { in cbcp_AdjustResponse()
391 (int)addr->type); in cbcp_AdjustResponse()
395 /* we accept the REQ even if the peer didn't specify an addr->type */ in cbcp_AdjustResponse()
416 addr = (struct cbcp_addr *)data->addr_start; in cbcp_AdjustResponse()
417 if (addr->type != CBCP_ADDR_PSTN) { in cbcp_AdjustResponse()
419 (int)addr->type); in cbcp_AdjustResponse()
432 if (!strcmp(next, addr->addr)) { in cbcp_AdjustResponse()
450 addr = (struct cbcp_addr *)data->addr_start; in cbcp_AdjustResponse()
453 while (addr->addr < end) { in cbcp_AdjustResponse()
454 if (addr->type == CBCP_ADDR_PSTN) { in cbcp_AdjustResponse()
458 if (!strcmp(next, addr->addr)) { in cbcp_AdjustResponse()
465 (int)addr->type); in cbcp_AdjustResponse()
466 addr = (struct cbcp_addr *)(addr->addr + strlen(addr->addr) + 1); in cbcp_AdjustResponse()
481 struct cbcp_addr *addr; in cbcp_SendResponse() local
490 addr = (struct cbcp_addr *)data.addr_start; in cbcp_SendResponse()
494 addr->type = CBCP_ADDR_PSTN; in cbcp_SendResponse()
495 strncpy(addr->addr, cbcp->fsm.phone, sizeof addr->addr - 1); in cbcp_SendResponse()
496 addr->addr[sizeof addr->addr - 1] = '\0'; in cbcp_SendResponse()
497 data.length = (addr->addr + strlen(addr->addr) + 1) - (char *)&data; in cbcp_SendResponse()
520 struct cbcp_addr *addr; in cbcp_CheckResponse() local
522 addr = (struct cbcp_addr *)data->addr_start; in cbcp_CheckResponse()
530 if ((char *)data + data->length <= addr->addr) in cbcp_CheckResponse()
532 else if (addr->type != CBCP_ADDR_PSTN) in cbcp_CheckResponse()
534 addr->type); in cbcp_CheckResponse()
536 strncpy(cbcp->fsm.phone, addr->addr, sizeof cbcp->fsm.phone - 1); in cbcp_CheckResponse()
548 if ((char *)data + data->length <= addr->addr) in cbcp_CheckResponse()
550 else if (addr->type != CBCP_ADDR_PSTN) in cbcp_CheckResponse()
552 addr->type); in cbcp_CheckResponse()
559 if (!strcmp(addr->addr, next)) { in cbcp_CheckResponse()
588 struct cbcp_addr *addr; in cbcp_SendAck() local
601 addr = (struct cbcp_addr *)data.addr_start; in cbcp_SendAck()
602 addr->type = CBCP_ADDR_PSTN; in cbcp_SendAck()
603 strncpy(addr->addr, cbcp->fsm.phone, sizeof addr->addr - 1); in cbcp_SendAck()
604 addr->addr[sizeof addr->addr - 1] = '\0'; in cbcp_SendAck()
606 data.length = addr->addr + strlen(addr->addr) + 1 - (char *)&data; in cbcp_SendAck()