/* This procedure is passed a buffer descriptor for an iframe. It builds the rest of the control part of the frame and then writes it out.  */
static void x25_send_iframe(struct sock *sk, struct sk_buff *skb)
/* This procedure is passed a buffer descriptor for an iframe. It builds the rest of the control part of the frame and then writes it out.  */
static void x25_send_iframe(struct sock *sk, struct sk_buff *skb)
{
	struct x25_sock *x25 = x25_sk(sk);
	if (!skb)
		return;
	if (x25->neighbour->extended) {
		skb->data[2]  = (x25->vs << 1) & 0xFE;
		skb->data[3] &= X25_EXT_M_BIT;
		skb->data[3] |= (x25->vr << 1) & 0xFE;
	} else {
		skb->data[2] &= X25_STD_M_BIT;
		skb->data[2] |= (x25->vs << 1) & 0x0E;
		skb->data[2] |= (x25->vr << 5) & 0xE0;
	}
	x25_transmit_link(skb, x25->neighbour);
}