| version 1.7, 2000/06/27 18:57:41 |
version 1.8, 2000/07/21 12:37:00 |
| Line 214 mopSendASV(dst, src, ii, trans) |
|
| Line 214 mopSendASV(dst, src, ii, trans) |
|
| } |
} |
| } |
} |
| |
|
| |
#define MAX_ETH_PAYLOAD 1492 |
| |
|
| void |
void |
| mopStartLoad(dst, src, dl_rpr, trans) |
mopStartLoad(dst, src, dl_rpr, trans) |
| u_char *dst,*src; |
u_char *dst,*src; |
| Line 278 mopStartLoad(dst, src, dl_rpr, trans) |
|
| Line 280 mopStartLoad(dst, src, dl_rpr, trans) |
|
| dllist[slot].a_lseek = 0; |
dllist[slot].a_lseek = 0; |
| |
|
| dllist[slot].count = 0; |
dllist[slot].count = 0; |
| if (dllist[slot].dl_bsz >= 1492) |
if (dllist[slot].dl_bsz >= MAX_ETH_PAYLOAD || dllist[slot].dl_bsz == 0) |
| dllist[slot].dl_bsz = 1492; |
dllist[slot].dl_bsz = MAX_ETH_PAYLOAD; |
| if (dllist[slot].dl_bsz == 1030) /* VS/uVAX 2000 needs this */ |
if (dllist[slot].dl_bsz == 1030) /* VS/uVAX 2000 needs this */ |
| dllist[slot].dl_bsz = 1000; |
dllist[slot].dl_bsz = 1000; |
| if (dllist[slot].dl_bsz == 0) /* Needed by "big" VAXen */ |
if (dllist[slot].dl_bsz == 0) /* Needed by "big" VAXen */ |
| dllist[slot].dl_bsz = 1492; |
dllist[slot].dl_bsz = MAX_ETH_PAYLOAD; |
| if (trans == TRANS_8023) |
if (trans == TRANS_8023) |
| dllist[slot].dl_bsz = dllist[slot].dl_bsz - 8; |
dllist[slot].dl_bsz = dllist[slot].dl_bsz - 8; |
| |
|
| Line 366 mopNextLoad(dst, src, new_count, trans) |
|
| Line 368 mopNextLoad(dst, src, new_count, trans) |
|
| sprintf(line, |
sprintf(line, |
| "%x:%x:%x:%x:%x:%x Load completed", |
"%x:%x:%x:%x:%x:%x Load completed", |
| dst[0],dst[1],dst[2],dst[3],dst[4],dst[5]); |
dst[0],dst[1],dst[2],dst[3],dst[4],dst[5]); |
| syslog(LOG_INFO, line); |
syslog(LOG_INFO, "%s", line); |
| return; |
return; |
| } |
} |
| |
|
| dllist[slot].lseek = lseek(dllist[slot].ldfd,0L,SEEK_CUR); |
dllist[slot].lseek = lseek(dllist[slot].ldfd,0L,SEEK_CUR); |
| |
|
| if (dllist[slot].dl_bsz >= 1492) |
if (dllist[slot].dl_bsz >= MAX_ETH_PAYLOAD) |
| dllist[slot].dl_bsz = 1492; |
dllist[slot].dl_bsz = MAX_ETH_PAYLOAD; |
| |
|
| index = 0; |
index = 0; |
| mopPutHeader(pkt, &index, dst, src, ptype, trans); |
mopPutHeader(pkt, &index, dst, src, ptype, trans); |
| Line 453 mopProcessDL(fd, ii, pkt, index, dst, sr |
|
| Line 455 mopProcessDL(fd, ii, pkt, index, dst, sr |
|
| { |
{ |
| u_char tmpc; |
u_char tmpc; |
| u_short moplen; |
u_short moplen; |
| u_char pfile[17], mopcode; |
u_char pfile[129], mopcode; |
| char filename[FILENAME_MAX]; |
char filename[FILENAME_MAX]; |
| char line[100]; |
char line[100]; |
| int i,nfd,iindex; |
int i,nfd,iindex; |
| Line 502 mopProcessDL(fd, ii, pkt, index, dst, sr |
|
| Line 504 mopProcessDL(fd, ii, pkt, index, dst, sr |
|
| rpr_pgty = mopGetChar(pkt,index); /* Program Type */ |
rpr_pgty = mopGetChar(pkt,index); /* Program Type */ |
| |
|
| tmpc = mopGetChar(pkt,index); /* Software ID Len */ |
tmpc = mopGetChar(pkt,index); /* Software ID Len */ |
| |
if (tmpc > sizeof(pfile) - 1) |
| |
return; |
| for (i = 0; i < tmpc; i++) { |
for (i = 0; i < tmpc; i++) { |
| pfile[i] = mopGetChar(pkt,index); |
pfile[i] = mopGetChar(pkt,index); |
| pfile[i+1] = '\0'; |
pfile[i+1] = '\0'; |
| Line 543 mopProcessDL(fd, ii, pkt, index, dst, sr |
|
| Line 547 mopProcessDL(fd, ii, pkt, index, dst, sr |
|
| src[0],src[1],src[2], |
src[0],src[1],src[2], |
| src[3],src[4],src[5],trans,pfile); |
src[3],src[4],src[5],trans,pfile); |
| } |
} |
| syslog(LOG_INFO, line); |
syslog(LOG_INFO, "%s", line); |
| } else { |
} else { |
| if ((mopCmpEAddr(dst,ii->eaddr) == 0)) { |
if ((mopCmpEAddr(dst,ii->eaddr) == 0)) { |
| dl_rpr->ldfd = open(filename, O_RDONLY, 0); |
dl_rpr->ldfd = open(filename, O_RDONLY, 0); |
| Line 552 mopProcessDL(fd, ii, pkt, index, dst, sr |
|
| Line 556 mopProcessDL(fd, ii, pkt, index, dst, sr |
|
| "%x:%x:%x:%x:%x:%x Send me %s", |
"%x:%x:%x:%x:%x:%x Send me %s", |
| src[0],src[1],src[2], |
src[0],src[1],src[2], |
| src[3],src[4],src[5],pfile); |
src[3],src[4],src[5],pfile); |
| syslog(LOG_INFO, line); |
syslog(LOG_INFO, "%s", line); |
| } |
} |
| } |
} |
| |
|