• Home
  • Raw
  • Download

Lines Matching refs:cp

82 static unsigned char *encode(unsigned char *cp, unsigned short n);
84 static unsigned char * put16(unsigned char *cp, unsigned short x);
171 put16(unsigned char *cp, unsigned short x) in put16() argument
173 *cp++ = x >> 8; in put16()
174 *cp++ = x; in put16()
176 return cp; in put16()
182 encode(unsigned char *cp, unsigned short n) in encode() argument
185 *cp++ = 0; in encode()
186 cp = put16(cp,n); in encode()
188 *cp++ = n; in encode()
190 return cp; in encode()
237 unsigned char *cp = new_seq; in slhc_compress() local
371 cp = encode(cp,deltaS); in slhc_compress()
381 cp = encode(cp,deltaS); in slhc_compress()
387 cp = encode(cp,deltaA); in slhc_compress()
393 cp = encode(cp,deltaS); in slhc_compress()
420 cp = new_seq; in slhc_compress()
427 cp = new_seq; in slhc_compress()
433 cp = encode(cp,deltaS); in slhc_compress()
450 deltaS = cp - new_seq; in slhc_compress()
452 cp = ocp; in slhc_compress()
454 *cp++ = changes | NEW_C; in slhc_compress()
455 *cp++ = cs->cs_this; in slhc_compress()
458 cp = ocp; in slhc_compress()
460 *cp++ = changes; in slhc_compress()
462 *(__sum16 *)cp = csum; in slhc_compress()
463 cp += 2; in slhc_compress()
465 memcpy(cp,new_seq,deltaS); /* Write list of deltas */ in slhc_compress()
466 memcpy(cp+deltaS,icp+hlen,isize-hlen); in slhc_compress()
469 return isize - hlen + deltaS + (cp - ocp); in slhc_compress()
501 unsigned char *cp = icp; in slhc_uncompress() local
509 changes = *cp++; in slhc_uncompress()
514 x = *cp++; /* Read conn index */ in slhc_uncompress()
537 thp->check = *(__sum16 *)cp; in slhc_uncompress()
538 cp += 2; in slhc_uncompress()
567 if((x = decode(&cp)) == -1) { in slhc_uncompress()
574 if((x = decode(&cp)) == -1) { in slhc_uncompress()
580 if((x = decode(&cp)) == -1) { in slhc_uncompress()
586 if((x = decode(&cp)) == -1) { in slhc_uncompress()
594 if((x = decode(&cp)) == -1) { in slhc_uncompress()
607 len = isize - (cp - icp); in slhc_uncompress()
614 memmove(icp + hdrlen, cp, len - hdrlen); in slhc_uncompress()
616 cp = icp; in slhc_uncompress()
617 memcpy(cp, ip, 20); in slhc_uncompress()
618 cp += 20; in slhc_uncompress()
621 memcpy(cp, cs->cs_ipopt, (ip->ihl - 5) * 4); in slhc_uncompress()
622 cp += (ip->ihl - 5) * 4; in slhc_uncompress()
628 memcpy(cp, thp, 20); in slhc_uncompress()
629 cp += 20; in slhc_uncompress()
632 memcpy(cp, cs->cs_tcpopt, ((thp->doff) - 5) * 4); in slhc_uncompress()
633 cp += ((thp->doff) - 5) * 4; in slhc_uncompress()