rplin.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
* Copyright 2000 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <poll.h>
#include "rpld.h"
extern char ctlbuf[];
extern char databuf[];
extern int debugLevel;
extern long delayGran;
extern long startDelay;
extern char debugmsg[];
extern client_t *clientlookup();
int
int fd;
{
int flags;
long in_seqnum;
char b[20];
flags = 0;
perror("getmsg in incoming\n");
return(-1);
}
/*
dumpctl(&ctl);
dumpdata(&data);
*/
switch (databuf[3]) {
case CMD_FIND:
if (debugLevel >= MSG_INFO_1) {
}
if (clientvalidate() < 0) {
if (debugLevel >= MSG_WARN_2) {
}
return;
}
break;
case CMD_SEND_FILE:
if (debugLevel >= MSG_INFO_1) {
}
if (debugLevel >= MSG_WARN_2) {
}
return;
}
case ST_FOUND_SENT:
break;
case ST_DATA_XFER:
case ST_FINISH:
/*
* Need to adjust the delay timing by looking at
* the sequence number requested. If the sequence
* number is smaller than the current sequence
* number, it is a retransmit request. The delay
* would be adjusted upwards. However, if the
* sequence number is the same or 1 larger than
* the current sequence number, the delay is too
* long and we adjust it downwards.
*/
}
if (debugLevel >= MSG_WARN_2) {
}
/*
* Adjust the currfp and seekfp to point
* to this requested sequence number's
* frame so that when we next send a frame
* out, it would pick up from there.
*/
while (tmpfp) {
break;
else {
}
}
if (tmpfp) {
if (debugLevel >= MSG_ERROR_1) {
}
return;
}
}
/*
* If it was the last file in the list
* of boot files, when we have sent out
* the last frame and waiting for time
* out, the file has been closed, and
* cp->fstr will be reset to NULL.
* Here we must check for this and
* reopen this file.
*/
if (debugLevel >= MSG_ERROR_1) {
}
return;
}
}
}
/* Adjust delay factors */
if (debugLevel >= MSG_INFO_1) {
}
else
else
if (debugLevel >= MSG_INFO_1) {
}
}
break;
default:
if (debugLevel >= MSG_WARN_2) {
}
}
break;
case CMD_PROGRAM_ALERT:
if (debugLevel >= MSG_WARN_2) {
}
break;
}
return(0);
}