30 #include <linux/string.h>
31 #include <linux/kernel.h>
33 #include <linux/types.h>
34 #include <linux/slab.h>
40 #include <asm/string.h>
42 #include <linux/isdnif.h>
74 len = 18 +
strlen(calledPN);
79 if ((*skb = dev_alloc_skb(len)) ==
NULL) {
137 if ((*skb = dev_alloc_skb(5)) ==
NULL) {
157 if ((*skb = dev_alloc_skb(8)) ==
NULL) {
185 if ((*skb = dev_alloc_skb(2)) ==
NULL) {
205 if ((*skb = dev_alloc_skb(18)) ==
NULL) {
215 switch (chan->proto) {
236 *(
skb_put(*skb, 1)) = (outgoing ? 0x02 : 0x42);
266 if ((*skb = dev_alloc_skb(7)) ==
NULL) {
275 *(
skb_put(*skb, 1)) = chan->layer2link;
300 if (skb_headroom(skb) < 10)
302 printk(
KERN_CRIT "No headspace (%u) on headroom %p for capi header\n", skb_headroom(skb), skb);
309 *((
u16 *) (skb->
data)) = chan->callref;
310 skb->
data[2] = chan->layer2link;
313 chan->s_refnum = (chan->s_refnum + 1) % 8;
314 *((
u32 *) (skb->
data + 5)) = chan->s_refnum;
324 if ((*skb = dev_alloc_skb(4)) ==
NULL) {
332 *(
skb_put(*skb, 1)) = chan->layer2link;
333 *(
skb_put(*skb, 1)) = chan->r_refnum;
341 if ((*skb = dev_alloc_skb(6)) ==
NULL) {
351 *(
skb_put(*skb, 1)) = 0x80 | cause;
364 if ((*skb = dev_alloc_skb(2)) ==
NULL) {
402 CIlen = skb->
data[0];
406 if (((skb->
data[1]) & 0xFC) == 0x48)
426 if ((skb->
data[1] & 0x80) == 0)
432 skb_copy_from_linear_data_offset(skb, count + 1,
455 if ((skb->
data[1] & 0x80) == 0)
461 skb_copy_from_linear_data_offset(skb, count + 1,
504 *complete = *(skb->
data);
543 if (len > 1 && len < 31) {
544 skb_copy_from_linear_data_offset(skb, 2, str, len - 1);
584 chan->layer2link = *(skb->
data);
597 if (chan->layer2link != *(skb->
data))
598 printk(
"capi_decode_actv_trans_conf: layer2link doesn't match\n");
621 for (i = 0; i < len; i++)
639 if (len < 64 && len == hdrlen - 1) {
640 memcpy(str, hdr + 1, hdrlen - 1);
645 printk(
"debug message incorrect\n");