Lines Matching refs:idx

37 mopPutChar(u_char *pkt, int *idx, u_char value)
39 pkt[*idx] = value;
40 *idx = *idx + 1;
44 mopPutShort(u_char *pkt, int *idx, u_short value)
48 pkt[*idx+i] = value % 256;
51 *idx = *idx + 2;
55 mopPutLong(u_char *pkt, int *idx, u_int32_t value)
59 pkt[*idx+i] = value % 256;
62 *idx = *idx + 4;
66 mopPutMulti(u_char *pkt, int *idx, const u_char *value, int size)
71 pkt[*idx+i] = value[i];
73 *idx = *idx + size;
77 mopPutTime(u_char *pkt, int *idx, time_t value)
90 mopPutChar (pkt,idx,10);
91 mopPutChar (pkt,idx,(timenow->tm_year / 100) + 19);
92 mopPutChar (pkt,idx,(timenow->tm_year % 100));
93 mopPutChar (pkt,idx,(timenow->tm_mon + 1));
94 mopPutChar (pkt,idx,(timenow->tm_mday));
95 mopPutChar (pkt,idx,(timenow->tm_hour));
96 mopPutChar (pkt,idx,(timenow->tm_min));
97 mopPutChar (pkt,idx,(timenow->tm_sec));
98 mopPutChar (pkt,idx,0x00);
99 mopPutChar (pkt,idx,0x00);
100 mopPutChar (pkt,idx,0x00);
104 mopPutHeader(u_char *pkt, int *idx, const u_char *dst, const u_char *src,
108 mopPutMulti(pkt, idx, dst, 6);
109 mopPutMulti(pkt, idx, src, 6);
111 mopPutShort(pkt, idx, 0);
112 mopPutChar (pkt, idx, MOP_K_PROTO_802_DSAP);
113 mopPutChar (pkt, idx, MOP_K_PROTO_802_SSAP);
114 mopPutChar (pkt, idx, MOP_K_PROTO_802_CNTL);
115 mopPutChar (pkt, idx, 0x08);
116 mopPutChar (pkt, idx, 0x00);
117 mopPutChar (pkt, idx, 0x2b);
120 mopPutChar(pkt, idx, (proto / 256));
121 mopPutChar(pkt, idx, (proto % 256));
124 mopPutChar(pkt, idx, (proto / 256));
125 mopPutChar(pkt, idx, (proto % 256));
127 mopPutChar(pkt, idx, (proto % 256));
128 mopPutChar(pkt, idx, (proto / 256));
132 mopPutShort(pkt, idx, 0);
139 int idx = 0;
143 idx = 14;
144 mopPutChar(pkt, &idx, ((len - 16) % 256));
145 mopPutChar(pkt, &idx, ((len - 16) / 256));
148 idx = 12;
150 mopPutChar(pkt, &idx, ((len - 14) / 256));
151 mopPutChar(pkt, &idx, ((len - 14) % 256));
153 mopPutChar(pkt, &idx, ((len - 14) % 256));
154 mopPutChar(pkt, &idx, ((len - 14) / 256));