Lines Matching defs:pkt
41 mopGetChar(const u_char *pkt, int *idx)
45 ret = pkt[*idx];
51 mopGetShort(const u_char *pkt, int *idx)
55 ret = pkt[*idx] + pkt[*idx+1]*256;
61 mopGetLong(const u_char *pkt, int *idx)
65 ret = pkt[*idx] +
66 pkt[*idx+1]*0x100 +
67 pkt[*idx+2]*0x10000 +
68 pkt[*idx+3]*0x1000000;
74 mopGetMulti(const u_char *pkt, int *idx, u_char *dest, int size)
79 dest[i] = pkt[*idx+i];
86 mopGetTrans(const u_char *pkt, int trans)
91 ptype = (const u_short *)(pkt+12);
102 mopGetHeader(const u_char *pkt, int *idx, const u_char **dst, const u_char **src,
105 *dst = pkt;
106 *src = pkt + 6;
111 *proto = (u_short)(pkt[*idx]*256 + pkt[*idx+1]);
113 *len = (int)(pkt[*idx+1]*256 + pkt[*idx]);
117 *len = (int)(pkt[*idx]*256 + pkt[*idx+1]);
119 *proto = (u_short)(pkt[*idx]*256 + pkt[*idx+1]);
126 mopGetLength(const u_char *pkt, int trans)
130 return(pkt[15]*256 + pkt[14]);
133 return(pkt[12]*256 + pkt[13]);