• Home
  • Raw
  • Download

Lines Matching refs:p

49 	unsigned char *p;  in x25_parse_facilities()  local
73 p = skb->data + 1; in x25_parse_facilities()
76 switch (*p & X25_FAC_CLASS_MASK) { in x25_parse_facilities()
80 switch (*p) { in x25_parse_facilities()
82 if((p[1] & 0x81) == 0x81) { in x25_parse_facilities()
83 facilities->reverse = p[1] & 0x81; in x25_parse_facilities()
88 if((p[1] & 0x01) == 0x01) { in x25_parse_facilities()
89 facilities->reverse = p[1] & 0x01; in x25_parse_facilities()
94 if((p[1] & 0x80) == 0x80) { in x25_parse_facilities()
95 facilities->reverse = p[1] & 0x80; in x25_parse_facilities()
100 if(p[1] == 0x00) { in x25_parse_facilities()
108 facilities->throughput = p[1]; in x25_parse_facilities()
116 p[0], p[1]); in x25_parse_facilities()
119 p += 2; in x25_parse_facilities()
125 switch (*p) { in x25_parse_facilities()
127 facilities->pacsize_in = p[1]; in x25_parse_facilities()
128 facilities->pacsize_out = p[2]; in x25_parse_facilities()
132 facilities->winsize_in = p[1]; in x25_parse_facilities()
133 facilities->winsize_out = p[2]; in x25_parse_facilities()
139 p[0], p[1], p[2]); in x25_parse_facilities()
142 p += 3; in x25_parse_facilities()
150 p[0], p[1], p[2], p[3]); in x25_parse_facilities()
151 p += 4; in x25_parse_facilities()
155 if (len < p[1] + 2) in x25_parse_facilities()
157 switch (*p) { in x25_parse_facilities()
159 if (p[1] > X25_MAX_DTE_FACIL_LEN || p[1] <= 1) in x25_parse_facilities()
161 if (p[2] > X25_MAX_AE_LEN) in x25_parse_facilities()
163 dte_facs->calling_len = p[2]; in x25_parse_facilities()
164 memcpy(dte_facs->calling_ae, &p[3], p[1] - 1); in x25_parse_facilities()
168 if (p[1] > X25_MAX_DTE_FACIL_LEN || p[1] <= 1) in x25_parse_facilities()
170 if (p[2] > X25_MAX_AE_LEN) in x25_parse_facilities()
172 dte_facs->called_len = p[2]; in x25_parse_facilities()
173 memcpy(dte_facs->called_ae, &p[3], p[1] - 1); in x25_parse_facilities()
178 "length %d\n", p[0], p[1]); in x25_parse_facilities()
181 len -= p[1] + 2; in x25_parse_facilities()
182 p += p[1] + 2; in x25_parse_facilities()
187 return p - skb->data; in x25_parse_facilities()
197 unsigned char *p = buffer + 1; in x25_create_facilities() local
211 *p++ = X25_FAC_REVERSE; in x25_create_facilities()
212 *p++ = facilities->reverse; in x25_create_facilities()
216 *p++ = X25_FAC_THROUGHPUT; in x25_create_facilities()
217 *p++ = facilities->throughput; in x25_create_facilities()
222 *p++ = X25_FAC_PACKET_SIZE; in x25_create_facilities()
223 *p++ = facilities->pacsize_in ? : facilities->pacsize_out; in x25_create_facilities()
224 *p++ = facilities->pacsize_out ? : facilities->pacsize_in; in x25_create_facilities()
229 *p++ = X25_FAC_WINDOW_SIZE; in x25_create_facilities()
230 *p++ = facilities->winsize_in ? : facilities->winsize_out; in x25_create_facilities()
231 *p++ = facilities->winsize_out ? : facilities->winsize_in; in x25_create_facilities()
235 *p++ = X25_MARKER; in x25_create_facilities()
236 *p++ = X25_DTE_SERVICES; in x25_create_facilities()
241 *p++ = X25_FAC_CALLING_AE; in x25_create_facilities()
242 *p++ = 1 + bytecount; in x25_create_facilities()
243 *p++ = dte_facs->calling_len; in x25_create_facilities()
244 memcpy(p, dte_facs->calling_ae, bytecount); in x25_create_facilities()
245 p += bytecount; in x25_create_facilities()
252 *p++ = X25_FAC_CALLED_AE; in x25_create_facilities()
253 *p++ = 1 + bytecount; in x25_create_facilities()
254 *p++ = dte_facs->called_len; in x25_create_facilities()
255 memcpy(p, dte_facs->called_ae, bytecount); in x25_create_facilities()
256 p+=bytecount; in x25_create_facilities()
259 len = p - buffer; in x25_create_facilities()