24 #include <linux/kernel.h>
25 #include <linux/string.h>
63 if (!pskb_may_pull(skb, 1))
68 if (!pskb_may_pull(skb, 1 + len))
80 if((p[1] & 0x81) == 0x81) {
81 facilities->
reverse = p[1] & 0x81;
86 if((p[1] & 0x01) == 0x01) {
87 facilities->
reverse = p[1] & 0x01;
92 if((p[1] & 0x80) == 0x80) {
93 facilities->
reverse = p[1] & 0x80;
113 "%02X, value %02X\n",
136 "%02X, values %02X, %02X\n",
147 "values %02X, %02X, %02X\n",
148 p[0], p[1], p[2], p[3]);
172 "length %d\n", p[0], p[1]);
181 return p - skb->
data;
191 unsigned char *
p = buffer + 1;
234 unsigned int bytecount = (dte_facs->
calling_len + 1) >> 1;
236 *p++ = 1 + bytecount;
243 unsigned int bytecount = (dte_facs->
called_len % 2) ?
247 *p++ = 1 + bytecount;
272 memset(&theirs, 0,
sizeof(theirs));
273 memcpy(
new, ours,
sizeof(*
new));
283 SOCK_DEBUG(sk,
"X.25: rejecting reverse charging request\n");
294 if (!ours_in || theirs_in < ours_in) {
295 SOCK_DEBUG(sk,
"X.25: inbound throughput negotiated\n");
296 new->throughput = (
new->throughput & 0xf0) | theirs_in;
298 if (!ours_out || theirs_out < ours_out) {
300 "X.25: outbound throughput negotiated\n");
301 new->throughput = (
new->throughput & 0x0f) | theirs_out;
307 SOCK_DEBUG(sk,
"X.25: packet size inwards negotiated down\n");
311 SOCK_DEBUG(sk,
"X.25: packet size outwards negotiated down\n");
318 SOCK_DEBUG(sk,
"X.25: window size inwards negotiated down\n");
322 SOCK_DEBUG(sk,
"X.25: window size outwards negotiated down\n");