Ejemplo n.º 1
0
static void
tx_ui(struct PStack *st)
{
	struct sk_buff *skb;
	u_char header[MAX_HEADER_LEN];
	int i;

	i = sethdraddr(&(st->l2), header, CMD);
	header[i++] = UI;
	while ((skb = skb_dequeue(&st->l2.ui_queue))) {
		memcpy(skb_push(skb, i), header, i);
		enqueue_ui(st, skb);
	}
}
Ejemplo n.º 2
0
static void
tx_ui(struct layer2 *l2)
{
	struct sk_buff *skb;
	u_char header[MAX_L2HEADER_LEN];
	int i;

	i = sethdraddr(l2, header, CMD);
	if (test_bit(FLG_LAPD_NET, &l2->flag))
		header[1] = 0xff; /* tei 127 */
	header[i++] = UI;
	while ((skb = skb_dequeue(&l2->ui_queue))) {
		memcpy(skb_push(skb, i), header, i);
		enqueue_ui(l2, skb);
	}
}
Ejemplo n.º 3
0
static void
tx_ui(layer2_t *l2)
{
	msg_t *msg;
	u_char header[MAX_HEADER_LEN];
	int i;

	i = sethdraddr(l2, header, CMD);
	if (test_bit(FLG_LAPD_NET, &l2->flag))
		header[1] = 0xff; /* tei 127 */
	header[i++] = UI;
	while ((msg = msg_dequeue(&l2->ui_queue))) {
		msg_pull(msg, mISDNUSER_HEAD_SIZE);
		memcpy(msg_push(msg, i), header, i);
		msg_push(msg, mISDNUSER_HEAD_SIZE);
		enqueue_ui(l2, msg);
	}
}