scan.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 1996-2001, 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* as they are called from different threads.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "dhcp_impl.h"
#else
#include <strings.h>
#endif /* _KERNEL && !_BOOT */
/*
* Scan field for options.
*/
static void
{
start++;
continue;
}
break; /* done */
if (*start > last_option) {
continue; /* unrecognized option */
}
/* all options besides CD_END and CD_PAD should have a len */
continue;
/* Ignores duplicate options. */
/* verify that len won't go beyond end */
continue;
}
}
}
}
/*
* Scan Vendor field for options.
*/
static void
{
return;
/* verify that len won't go beyond the end of the packet */
return;
}
/*
* Load opts table in PKT_LIST entry with PKT's options.
* Returns 0 if no fatal errors occur, otherwise...
*/
int
{
/*
* bcmp() is used here instead of memcmp() since kernel/standalone
* doesn't have a memcmp().
*/
return (0);
}
/* check the options field */
/*
* process vendor specific options. We look at the vendor options
* here, simply because a BOOTP server could fake DHCP vendor
* options. This increases our interoperability with BOOTP.
*/
return (0);
return (DHCP_GARBLED_MSG_TYPE);
return (DHCP_WRONG_MSG_TYPE);
return (DHCP_BAD_OPT_OVLD);
}
case 1:
break;
case 2:
break;
case 3:
break;
default:
return (DHCP_BAD_OPT_OVLD);
}
}
return (0);
}