Lines Matching refs:packlen
20 static int pqueue_alloc (int seq, unsigned char *packet, int packlen, pqueue_t **new);
32 static int pqueue_alloc(int seq, unsigned char *packet, int packlen, pqueue_t **new) {
36 DEBUG_CMD(log("seq=%d, packlen=%d", seq, packlen););
43 if (newent->capacity >= packlen) {
59 } /* end if capacity >= packlen */
71 DEBUG_CMD(log("realloc capacity %d to %d",newent->capacity, packlen););
73 newent->packet = (unsigned char *)realloc(newent->packet, packlen);
79 newent->capacity = packlen;
99 int size = packlen < MIN_CAPACITY ? MIN_CAPACITY : packlen;
109 assert( newent->capacity >= packlen );
111 memcpy(newent->packet, packet, packlen);
115 newent->packlen = packlen;
128 int pqueue_add (int seq, unsigned char *packet, int packlen) {
132 if ( 0 != pqueue_alloc(seq, packet, packlen, &newent) ) {