Lines Matching defs:response
186 LIBSPEC int readnatpmpresponse(natpmp_t * p, natpmpresp_t * response)
212 response->resultcode = ntohs(*((uint16_t *)(buf + 2)));
213 response->epoch = ntohl(*((uint32_t *)(buf + 4)));
218 else if(response->resultcode != 0) {
219 switch(response->resultcode) {
239 response->type = buf[1] & 0x7f;
241 //response->publicaddress.addr = *((uint32_t *)(buf + 8));
242 response->pnu.publicaddress.addr.s_addr = *((uint32_t *)(buf + 8));
244 response->pnu.newportmapping.privateport = ntohs(*((uint16_t *)(buf + 8)));
245 response->pnu.newportmapping.mappedpublicport = ntohs(*((uint16_t *)(buf + 10)));
246 response->pnu.newportmapping.lifetime = ntohl(*((uint32_t *)(buf + 12)));
254 int readnatpmpresponseorretry(natpmp_t * p, natpmpresp_t * response)
257 if(!p || !response)
261 n = readnatpmpresponse(p, response);