taglinefilesource code
sl131drivers/net/slip.csl_initialize(struct slip *sl, struct device *dev)
sl133drivers/net/slip.csl->inuse    = 0;
sl134drivers/net/slip.csl->sending    = 0;
sl135drivers/net/slip.csl->escape    = 0;
sl136drivers/net/slip.csl->flags    = 0;
sl138drivers/net/slip.csl->mode    = SL_MODE_ADAPTIVE;  /* automatic CSLIP recognition */
sl141drivers/net/slip.csl->mode    = SL_MODE_CSLIP | SL_MODE_ADAPTIVE;  /* Default */
sl143drivers/net/slip.csl->mode    = SL_MODE_SLIP;    /* Default for non compressors */
sl147drivers/net/slip.csl->line    = dev->base_addr;
sl148drivers/net/slip.csl->tty    = NULL;
sl149drivers/net/slip.csl->dev    = dev;
sl150drivers/net/slip.csl->slcomp    = NULL;
sl153drivers/net/slip.csl->rbuff    = NULL;
sl154drivers/net/slip.csl->xbuff    = NULL;
sl155drivers/net/slip.csl->cbuff    = NULL;
sl157drivers/net/slip.csl->rhead    = NULL;
sl158drivers/net/slip.csl->rend    = NULL;
sl170drivers/net/slip.cstruct slip *sl;
sl175drivers/net/slip.csl = &sl_ctrl[i];
sl176drivers/net/slip.cif (sl->tty == tty) return(sl);
sl187drivers/net/slip.cstruct slip *sl;
sl193drivers/net/slip.csl = &sl_ctrl[i];
sl194drivers/net/slip.cif (sl->inuse == 0) {
sl195drivers/net/slip.csl->inuse = 1;
sl196drivers/net/slip.csl->tty = NULL;
sl198drivers/net/slip.creturn(sl);
sl208drivers/net/slip.csl_free(struct slip *sl)
sl212drivers/net/slip.cif (sl->inuse) {
sl215drivers/net/slip.csl->inuse = 0;
sl216drivers/net/slip.csl->tty = NULL;
sl225drivers/net/slip.cstatic void sl_changedmtu(struct slip *sl)
sl227drivers/net/slip.cstruct device *dev=sl->dev;
sl230drivers/net/slip.cint omtu=sl->mtu;
sl232drivers/net/slip.csl->mtu=dev->mtu;
sl244drivers/net/slip.csl->mtu=omtu;
sl257drivers/net/slip.ctf=(unsigned char *)sl->dev->mem_start;
sl258drivers/net/slip.csl->dev->mem_start=(unsigned long)tb;
sl259drivers/net/slip.csl->dev->mem_end=(unsigned long) (sl->dev->mem_start + l);
sl260drivers/net/slip.crf=(unsigned char *)sl->dev->rmem_start;
sl261drivers/net/slip.csl->dev->rmem_start=(unsigned long)rb;
sl262drivers/net/slip.csl->dev->rmem_end=(unsigned long) (sl->dev->rmem_start + l);
sl264drivers/net/slip.csl->xbuff = (unsigned char *) sl->dev->mem_start;
sl265drivers/net/slip.csl->rbuff = (unsigned char *) sl->dev->rmem_start;
sl266drivers/net/slip.csl->rend  = (unsigned char *) sl->dev->rmem_end;
sl267drivers/net/slip.csl->rhead = sl->rbuff;
sl269drivers/net/slip.ccf=sl->cbuff;
sl270drivers/net/slip.csl->cbuff=cb;
sl272drivers/net/slip.csl->escape=0;
sl273drivers/net/slip.csl->sending=0;
sl274drivers/net/slip.csl->rcount=0;
sl289drivers/net/slip.csl_enqueue(struct slip *sl, unsigned char c)
sl295drivers/net/slip.cif (sl->rhead < sl->rend) {
sl296drivers/net/slip.c*sl->rhead = c;
sl297drivers/net/slip.csl->rhead++;
sl298drivers/net/slip.csl->rcount++;
sl299drivers/net/slip.c} else sl->roverrun++;
sl305drivers/net/slip.csl_dequeue(struct slip *sl, int i)
sl311drivers/net/slip.cif (sl->rhead > sl->rbuff) {
sl312drivers/net/slip.csl->rhead -= i;
sl313drivers/net/slip.csl->rcount -= i;
sl321drivers/net/slip.csl_lock(struct slip *sl)
sl327drivers/net/slip.csl->sending = 1;
sl328drivers/net/slip.csl->dev->tbusy = 1;
sl335drivers/net/slip.csl_unlock(struct slip *sl)
sl341drivers/net/slip.csl->sending = 0;
sl342drivers/net/slip.csl->dev->tbusy = 0;
sl349drivers/net/slip.csl_bump(struct slip *sl)
sl356drivers/net/slip.ccount = sl->rcount;
sl357drivers/net/slip.cif (sl->mode & (SL_MODE_ADAPTIVE | SL_MODE_CSLIP)) {
sl358drivers/net/slip.cif ((c = sl->rbuff[0]) & SL_TYPE_COMPRESSED_TCP) {
sl361drivers/net/slip.cif (!(sl->mode & SL_MODE_CSLIP)) {
sl369drivers/net/slip.cif ((sl->rhead + 80) < sl->rend) {
sl370drivers/net/slip.csl->rhead += 80;
sl371drivers/net/slip.csl->rcount += 80;
sl374drivers/net/slip.csl->roverrun++;
sl381drivers/net/slip.ccount = slhc_uncompress(sl->slcomp, sl->rbuff, count);
sl383drivers/net/slip.csl->errors++;
sl387drivers/net/slip.cif (!(sl->mode & SL_MODE_CSLIP)) {
sl389drivers/net/slip.csl->mode |= SL_MODE_CSLIP;
sl392drivers/net/slip.csl->rbuff[0] &= 0x4f;
sl393drivers/net/slip.cif (slhc_remember(sl->slcomp, sl->rbuff, count) <= 0) {
sl394drivers/net/slip.csl->errors++;
sl400drivers/net/slip.cDPRINTF((DBG_SLIP, "<< \"%s\" recv:\r\n", sl->dev->name));
sl401drivers/net/slip.cip_dump(sl->rbuff, sl->rcount);
sl406drivers/net/slip.csl->rcount, sl->rbuff));
sl408drivers/net/slip.cdone = dev_rint(sl->rbuff, count, 0, sl->dev);
sl412drivers/net/slip.csl->rpacket++;
sl418drivers/net/slip.csl_next(struct slip *sl)
sl420drivers/net/slip.cDPRINTF((DBG_SLIP, "SLIP: sl_next(0x%X) called!\n", sl));
sl421drivers/net/slip.csl_unlock(sl);
sl422drivers/net/slip.cdev_tint(sl->dev);
sl428drivers/net/slip.csl_encaps(struct slip *sl, unsigned char *icp, int len)
sl434drivers/net/slip.cDPRINTF((DBG_SLIP, ">> \"%s\" sent:\r\n", sl->dev->name));
sl438drivers/net/slip.cif(sl->mtu != sl->dev->mtu)  /* Someone has been ifconfigging */
sl439drivers/net/slip.csl_changedmtu(sl);
sl441drivers/net/slip.cif(len>sl->mtu)    /* Sigh, shouldn't occur BUT ... */
sl443drivers/net/slip.clen=sl->mtu;
sl448drivers/net/slip.cif(sl->mode & SL_MODE_CSLIP)
sl449drivers/net/slip.clen = slhc_compress(sl->slcomp, p, len, sl->cbuff, &p, 1);
sl457drivers/net/slip.cbp = sl->xbuff;
sl486drivers/net/slip.cif(sl->mode & SL_MODE_SLIP6)
sl487drivers/net/slip.ccount=slip_esc6(p, (unsigned char *)sl->xbuff,len);
sl489drivers/net/slip.ccount=slip_esc(p, (unsigned char *)sl->xbuff,len);
sl491drivers/net/slip.csl->spacket++;
sl492drivers/net/slip.cbp = sl->xbuff;
sl496drivers/net/slip.cif (tty_write_data(sl->tty, (char *) bp, count,
sl497drivers/net/slip.c(void (*)(void *))sl_next, (void *) sl) == 0) {
sl499drivers/net/slip.csl_next(sl);
sl524drivers/net/slip.cstruct slip *sl;
sl527drivers/net/slip.csl = &sl_ctrl[dev->base_addr];
sl528drivers/net/slip.ctty = sl->tty;
sl530drivers/net/slip.cdev->name, skb, sl->sending));
sl537drivers/net/slip.cif (sl->sending) {
sl539drivers/net/slip.csl->sbusy++;
sl546drivers/net/slip.cif(sl->mode & SL_MODE_AX25)
sl557drivers/net/slip.csl_lock(sl);
sl559drivers/net/slip.csl_encaps(sl, (unsigned char *) (skb + 1), skb->len);
sl571drivers/net/slip.cstruct slip *sl=&sl_ctrl[dev->base_addr];
sl572drivers/net/slip.cif(sl->mode&SL_MODE_AX25)
sl585drivers/net/slip.cstruct slip *sl=&sl_ctrl[dev->base_addr];
sl586drivers/net/slip.cif((sl->mode&SL_MODE_AX25) && type!=NET16(ETH_P_AX25))
sl599drivers/net/slip.cstruct slip *sl=&sl_ctrl[dev->base_addr];
sl601drivers/net/slip.cif(sl->mode&SL_MODE_AX25)
sl612drivers/net/slip.cstruct slip *sl=&sl_ctrl[dev->base_addr];
sl614drivers/net/slip.cif(sl->mode&SL_MODE_AX25)
sl625drivers/net/slip.cstruct slip *sl;
sl629drivers/net/slip.csl = &sl_ctrl[dev->base_addr];
sl630drivers/net/slip.cif (sl->tty == NULL) {
sl631drivers/net/slip.cDPRINTF((DBG_SLIP, "SLIP: channel %d not connected!\n", sl->line));
sl634drivers/net/slip.csl->dev = dev;
sl651drivers/net/slip.csl->mtu    = dev->mtu;
sl652drivers/net/slip.csl->dev->mem_start  = (unsigned long) p;
sl653drivers/net/slip.csl->dev->mem_end  = (unsigned long) (sl->dev->mem_start + l);
sl660drivers/net/slip.csl->dev->rmem_start  = (unsigned long) p;
sl661drivers/net/slip.csl->dev->rmem_end  = (unsigned long) (sl->dev->rmem_start + l);
sl663drivers/net/slip.csl->xbuff    = (unsigned char *) sl->dev->mem_start;
sl664drivers/net/slip.csl->rbuff    = (unsigned char *) sl->dev->rmem_start;
sl665drivers/net/slip.csl->rend    = (unsigned char *) sl->dev->rmem_end;
sl666drivers/net/slip.csl->rhead    = sl->rbuff;
sl668drivers/net/slip.csl->escape    = 0;
sl669drivers/net/slip.csl->sending    = 0;
sl670drivers/net/slip.csl->rcount    = 0;
sl674drivers/net/slip.ckfree((unsigned char *)sl->dev->mem_start);
sl678drivers/net/slip.csl->cbuff    = p;
sl680drivers/net/slip.csl->slcomp = slhc_init(16, 16);
sl681drivers/net/slip.cif (sl->slcomp == NULL) {
sl682drivers/net/slip.ckfree((unsigned char *)sl->dev->mem_start);
sl683drivers/net/slip.ckfree((unsigned char *)sl->dev->rmem_start);
sl684drivers/net/slip.ckfree(sl->cbuff);
sl689drivers/net/slip.cDPRINTF((DBG_SLIP, "SLIP: channel %d opened.\n", sl->line));
sl698drivers/net/slip.cstruct slip *sl;
sl700drivers/net/slip.csl = &sl_ctrl[dev->base_addr];
sl701drivers/net/slip.cif (sl->tty == NULL) {
sl702drivers/net/slip.cDPRINTF((DBG_SLIP, "SLIP: channel %d not connected!\n", sl->line));
sl705drivers/net/slip.csl_free(sl);
sl708drivers/net/slip.ckfree(sl->rbuff);
sl709drivers/net/slip.ckfree(sl->xbuff);
sl710drivers/net/slip.ckfree(sl->cbuff);
sl711drivers/net/slip.cslhc_free(sl->slcomp);
sl713drivers/net/slip.csl_initialize(sl, dev);
sl715drivers/net/slip.cDPRINTF((DBG_SLIP, "SLIP: channel %d closed.\n", sl->line));
sl731drivers/net/slip.cstruct slip *sl;
sl735drivers/net/slip.cif ((sl = sl_find(tty)) == NULL) return;  /* not connected */
sl737drivers/net/slip.cif(sl->mtu!=sl->dev->mtu)  /* Argh! mtu change time! - costs us the packet part received at the change */
sl738drivers/net/slip.csl_changedmtu(sl);
sl754drivers/net/slip.cif (sl->escape) {
sl756drivers/net/slip.csl_enqueue(sl, ESC);
sl758drivers/net/slip.csl_enqueue(sl, END);
sl761drivers/net/slip.csl->escape = 0;
sl764drivers/net/slip.csl->escape = 1;
sl766drivers/net/slip.cif (sl->rcount > 2) sl_bump(sl);
sl767drivers/net/slip.csl_dequeue(sl, sl->rcount);
sl768drivers/net/slip.csl->rcount = 0;
sl769drivers/net/slip.c} else  sl_enqueue(sl, c);
sl773drivers/net/slip.cif(sl->mode & SL_MODE_SLIP6)
sl774drivers/net/slip.cslip_unesc6(sl,buff,count,error);
sl776drivers/net/slip.cslip_unesc(sl,buff,count,error);
sl793drivers/net/slip.cstruct slip *sl;
sl796drivers/net/slip.cif ((sl = sl_find(tty)) != NULL) {
sl798drivers/net/slip.ctty->line, sl->dev->name));
sl803drivers/net/slip.cif ((sl = sl_alloc()) == NULL) {
sl808drivers/net/slip.csl->tty = tty;
sl813drivers/net/slip.c(void) sl_open(sl->dev);
sl815drivers/net/slip.ctty->line, sl->dev->name));
sl818drivers/net/slip.creturn(sl->line);
sl826drivers/net/slip.cstruct slip *sl;
sl830drivers/net/slip.csl = &sl_ctrl[dev->base_addr];
sl831drivers/net/slip.cif (! sl)
sl836drivers/net/slip.cstats.rx_packets = sl->rpacket;
sl837drivers/net/slip.cstats.rx_over_errors = sl->roverrun;
sl838drivers/net/slip.cstats.tx_packets = sl->spacket;
sl839drivers/net/slip.cstats.tx_dropped = sl->sbusy;
sl840drivers/net/slip.cstats.rx_errors = sl->errors;
sl842drivers/net/slip.ccomp = sl->slcomp;
sl862drivers/net/slip.cstruct slip *sl;
sl865drivers/net/slip.cif ((sl = sl_find(tty)) == NULL) {
sl870drivers/net/slip.c(void) dev_close(sl->dev);
sl872drivers/net/slip.ctty->line, sl->dev->name));
sl920drivers/net/slip.cslip_unesc(struct slip *sl, unsigned char *s, int count, int error)
sl927drivers/net/slip.csl->flags |= SLF_ESCAPE;
sl930drivers/net/slip.cif (sl->flags & SLF_ESCAPE)
sl931drivers/net/slip.csl_enqueue(sl, ESC);
sl933drivers/net/slip.csl_enqueue(sl, *s);
sl934drivers/net/slip.csl->flags &= ~SLF_ESCAPE;
sl937drivers/net/slip.cif (sl->flags & SLF_ESCAPE)
sl938drivers/net/slip.csl_enqueue(sl, END);
sl940drivers/net/slip.csl_enqueue(sl, *s);
sl941drivers/net/slip.csl->flags &= ~SLF_ESCAPE;
sl944drivers/net/slip.cif (sl->rcount > 2) 
sl945drivers/net/slip.csl_bump(sl);
sl946drivers/net/slip.csl_dequeue(sl, sl->rcount);
sl947drivers/net/slip.csl->rcount = 0;
sl948drivers/net/slip.csl->flags &= ~(SLF_ESCAPE | SLF_ERROR);
sl951drivers/net/slip.csl_enqueue(sl, *s);
sl952drivers/net/slip.csl->flags &= ~SLF_ESCAPE;
sl956drivers/net/slip.csl->flags |= SLF_ERROR;
sl1007drivers/net/slip.cslip_unesc6(struct slip *sl, unsigned char *s, int count, int error)
sl1014drivers/net/slip.cif (sl->rcount > 8) {  /* XXX must be 2 for compressed slip */
sl1017drivers/net/slip.csl->rbuff[0],
sl1018drivers/net/slip.csl->rbuff[1],
sl1019drivers/net/slip.csl->rbuff[2],
sl1020drivers/net/slip.csl->rbuff[3]
sl1023drivers/net/slip.csl_bump(sl);
sl1025drivers/net/slip.csl_dequeue(sl, sl->rcount);
sl1026drivers/net/slip.csl->rcount = 0;
sl1027drivers/net/slip.csl->flags &= ~(SLF_ESCAPE | SLF_ERROR); /* SLF_ESCAPE not used */
sl1028drivers/net/slip.csl->xbits = 0;
sl1030drivers/net/slip.csl->xdata = (sl->xdata << 6) | ((*s - 0x30) & 0x3F);
sl1031drivers/net/slip.csl->xbits += 6;
sl1032drivers/net/slip.cif (sl->xbits >= 8) {
sl1033drivers/net/slip.csl->xbits -= 8;
sl1034drivers/net/slip.cc = (unsigned char)(sl->xdata >> sl->xbits);
sl1035drivers/net/slip.csl_enqueue(sl, c);
sl1041drivers/net/slip.csl->flags |= SLF_ERROR;
sl1062drivers/net/slip.cstruct slip *sl;
sl1066drivers/net/slip.cif ((sl = sl_find(tty)) == NULL) {
sl1077drivers/net/slip.cmemcpy_tofs(arg, sl->dev->name, strlen(sl->dev->name) + 1);
sl1081drivers/net/slip.cput_fs_long(sl->mode,(long *)arg);
sl1085drivers/net/slip.csl->mode=get_fs_long((long *)arg);
sl1087drivers/net/slip.cif(sl->mode & SL_MODE_AX25)
sl1089drivers/net/slip.csl->dev->addr_len=7;  /* sizeof an AX.25 addr */
sl1090drivers/net/slip.csl->dev->hard_header_len=17;  /* We don't do digipeaters */
sl1091drivers/net/slip.csl->dev->type=3;    /* AF_AX25 not an AF_INET device */
sl1095drivers/net/slip.csl->dev->addr_len=0;  /* No mac addr in slip mode */
sl1096drivers/net/slip.csl->dev->hard_header_len=0;
sl1097drivers/net/slip.csl->dev->type=0;
sl1103drivers/net/slip.creturn sl_set_mac_address(sl->dev,arg);
sl1116drivers/net/slip.cstruct slip *sl;
sl1123drivers/net/slip.csl = &sl_ctrl[dev->base_addr];
sl1147drivers/net/slip.csl_initialize(sl, dev);
sl1150drivers/net/slip.csl->rcount    = 0;      /* SLIP receiver count  */
sl1151drivers/net/slip.csl->rpacket    = 0;      /* #frames received  */
sl1152drivers/net/slip.csl->roverrun    = 0;      /* "overrun" counter  */
sl1153drivers/net/slip.csl->spacket    = 0;      /* #frames sent out  */
sl1154drivers/net/slip.csl->sbusy    = 0;      /* "xmit busy" counter  */
sl1155drivers/net/slip.csl->errors    = 0;      /* not used at present  */
sl79drivers/net/slip.hextern void  slip_unesc(struct slip *sl, unsigned char *s, int count, int error);
sl80drivers/net/slip.hextern void   slip_unesc6(struct slip *sl, unsigned char *s, int count, int error);
sl628drivers/scsi/ultrastor.cstruct scatterlist *sl;
sl632drivers/scsi/ultrastor.csl = (struct scatterlist *) SCpnt->request_buffer;
sl635drivers/scsi/ultrastor.cmscp->sglist[i].address = (unsigned int)sl[i].address;
sl636drivers/scsi/ultrastor.cmscp->sglist[i].num_bytes = sl[i].length;
sl637drivers/scsi/ultrastor.ctransfer_length += sl[i].length;