}else if (is_digit(conf->addr[0])){	/* PVC */ 
}else if (isdigit(conf->addr[0])){	/* PVC */ 
static int new_if(struct wan_device* wandev, struct net_device* dev,		  wanif_conf_t* conf){	sdla_t* card = wandev->private;	x25_channel_t* chan;	int err = 0;	if ((conf->name[0] == '\0') || (strlen(conf->name) > WAN_IFNAME_SZ)){		printk(KERN_INFO "%s: invalid interface name!\n",			card->devname);		return -EINVAL;	}	if(card->wandev.new_if_cnt++ > 0 && card->u.x.LAPB_hdlc) {		printk(KERN_INFO "%s: Error: Running LAPB HDLC Mode !\n",						card->devname);		printk(KERN_INFO 			"%s: Maximum number of network interfaces must be one !\n",						card->devname);		return -EEXIST;	}	/* allocate and initialize private data */	chan = kmalloc(sizeof(x25_channel_t), GFP_ATOMIC);	if (chan == NULL){		return -ENOMEM;	}		memset(chan, 0, sizeof(x25_channel_t));	/* Bug Fix: Seg Err on PVC startup	 * It must be here since bind_lcn_to_dev expects 	 * it bellow */	dev->priv = chan;		strcpy(chan->name, conf->name);	chan->card = card;	chan->dev = dev;	chan->common.sk = NULL;	chan->common.func = NULL;	chan->common.rw_bind = 0;	chan->tx_skb = chan->rx_skb = NULL;	/* verify media address */	if (conf->addr[0] == '@'){		/* SVC */		chan->common.svc = 1;		strncpy(chan->addr, &conf->addr[1], WAN_ADDRESS_SZ);		/* Set channel timeouts (default if not specified) */		chan->idle_timeout = (conf->idle_timeout) ? 					conf->idle_timeout : 90;		chan->hold_timeout = (conf->hold_timeout) ? 					conf->hold_timeout : 10;	}else if (is_digit(conf->addr[0])){	/* PVC */		int lcn = dec_to_uint(conf->addr, 0);		if ((lcn >= card->u.x.lo_pvc) && (lcn <= card->u.x.hi_pvc)){			bind_lcn_to_dev (card, dev, lcn);		}else{			printk(KERN_ERR				"%s: PVC %u is out of range on interface %s!\n",				wandev->name, lcn, chan->name);			err = -EINVAL;		}	}else{		printk(KERN_ERR			"%s: invalid media address on interface %s!\n",			wandev->name, chan->name);		err = -EINVAL;	}	if(strcmp(conf->usedby, "WANPIPE") == 0){                printk(KERN_INFO "%s: Running in WANPIPE mode %s\n",			wandev->name, chan->name);                chan->common.usedby = WANPIPE;		chan->protocol = htons(ETH_P_IP);        }else if(strcmp(conf->usedby, "API") == 0){		chan->common.usedby = API;                printk(KERN_INFO "%s: Running in API mode %s\n",			wandev->name, chan->name);		chan->protocol = htons(X25_PROT);	}	if (err){		kfree(chan);		dev->priv = NULL;		return err;	}		chan->enable_IPX = conf->enable_IPX;		if (chan->enable_IPX)		chan->protocol = htons(ETH_P_IPX);		if (conf->network_number)		chan->network_number = conf->network_number;	else		chan->network_number = 0xDEADBEEF;	/* prepare network device data space for registration */	strcpy(dev->name,chan->name);	dev->init = &if_init;	init_x25_channel_struct(chan);	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/8e18d1f9c9dcbf2de5b79cad771ed639983ab6cd/sdla_x25.c/clean/drivers/net/wan/sdla_x25.c