data[i++] = (hdlc->state.fr.settings.lmi == LMI_CCITT) ? LMI_CCITT_PVCSTAT : LMI_PVCSTAT; 
data[i++] = lmi == LMI_CCITT ? LMI_CCITT_PVCSTAT : LMI_ANSI_CISCO_PVCSTAT; 
static void fr_lmi_send(struct net_device *dev, int fullrep){	hdlc_device *hdlc = dev_to_hdlc(dev);	struct sk_buff *skb;	pvc_device *pvc = hdlc->state.fr.first_pvc;	int len = (hdlc->state.fr.settings.lmi == LMI_ANSI) ? LMI_ANSI_LENGTH		: LMI_LENGTH;	int stat_len = 3;	u8 *data;	int i = 0;	if (hdlc->state.fr.settings.dce && fullrep) {		len += hdlc->state.fr.dce_pvc_count * (2 + stat_len);		if (len > HDLC_MAX_MRU) {			printk(KERN_WARNING "%s: Too many PVCs while sending "			       "LMI full report\n", dev->name);			return;		}	}	skb = dev_alloc_skb(len);	if (!skb) {		printk(KERN_WARNING "%s: Memory squeeze on fr_lmi_send()\n",		       dev->name);		return;	}	memset(skb->data, 0, len);	skb_reserve(skb, 4);	skb->protocol = __constant_htons(LMI_PROTO);	fr_hard_header(&skb, LMI_DLCI);	data = skb->tail;	data[i++] = LMI_CALLREF;	data[i++] = hdlc->state.fr.settings.dce		? LMI_STATUS : LMI_STATUS_ENQUIRY;	if (hdlc->state.fr.settings.lmi == LMI_ANSI)		data[i++] = LMI_ANSI_LOCKSHIFT;	data[i++] = (hdlc->state.fr.settings.lmi == LMI_CCITT)		? LMI_CCITT_REPTYPE : LMI_REPTYPE;	data[i++] = LMI_REPT_LEN;	data[i++] = fullrep ? LMI_FULLREP : LMI_INTEGRITY;	data[i++] = (hdlc->state.fr.settings.lmi == LMI_CCITT)		? LMI_CCITT_ALIVE : LMI_ALIVE;	data[i++] = LMI_INTEG_LEN;	data[i++] = hdlc->state.fr.txseq =fr_lmi_nextseq(hdlc->state.fr.txseq);	data[i++] = hdlc->state.fr.rxseq;	if (hdlc->state.fr.settings.dce && fullrep) {		while (pvc) {			data[i++] = (hdlc->state.fr.settings.lmi == LMI_CCITT)				? LMI_CCITT_PVCSTAT : LMI_PVCSTAT;			data[i++] = stat_len;			/* LMI start/restart */			if (hdlc->state.fr.reliable && !pvc->state.exist) {				pvc->state.exist = pvc->state.new = 1;				fr_log_dlci_active(pvc);			}			/* ifconfig PVC up */			if (pvc->open_count && !pvc->state.active &&			    pvc->state.exist && !pvc->state.new) {				pvc_carrier(1, pvc);				pvc->state.active = 1;				fr_log_dlci_active(pvc);			}			dlci_to_status(pvc->dlci, data + i,				       pvc->state.active, pvc->state.new);			i += stat_len;			pvc = pvc->next;		}	}	skb_put(skb, i);	skb->priority = TC_PRIO_CONTROL;	skb->dev = dev;	skb->nh.raw = skb->data;	dev_queue_xmit(skb);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b3dd65f958354226275522b5a64157834bdc5415/hdlc_fr.c/clean/drivers/net/wan/hdlc_fr.c