int BootpTry;
static ulong lAddr;
+static int BootpExtended (u8 *e);
+
void BootpVendorFieldProcess(u8 *ext)
{
int size = *(ext+1) ;
}
/* Initialize BOOTP extension fields in the request. */
-int BootpExtended (u8 *e)
+static int BootpExtended (u8 *e)
{
u8 *start = e ;
void
BootpRequest(char *fileName, ulong loadAdr)
{
- volatile uchar * pkt;
- Bootp_t * bp;
+ volatile uchar *pkt;
+ Bootp_t *bp;
+ int ext_len;
lAddr = loadAdr;
strcpy(bp->bp_file, fileName);
/* Request additional information from the BOOTP server */
- BootpExtended (bp->bp_vend) ;
+ ext_len = BootpExtended (bp->bp_vend) - sizeof(bp->bp_vend);
+ if (ext_len < 0) {
+ ext_len = 0;
+ }
/* store boot file name for repetitions in case of bootp timeout */
strcpy(BootFile, fileName);
BootpID += GetTicksSinceBoot();
bp->bp_id = BootpID;
- NetSendPacket(NetTxPacket, BOOTP_SIZE);
+ NetSendPacket(NetTxPacket, BOOTP_SIZE + ext_len);
NetSetTimeout(TIMEOUT * HZ, BootpTimeout);
NetSetHandler(BootpHandler);