From: Ben Warren <bwarren@qstreams.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] DHCP vendor or class ID option
Date: Tue, 06 Nov 2007 11:37:12 -0500 [thread overview]
Message-ID: <47309838.4020705@qstreams.com> (raw)
In-Reply-To: <e68c55e80711060752y461db7b5v95e2c653679109f1@mail.gmail.com>
Hi Jeff,
Jeffrey Mann wrote:
> U-boot users:
>
> I have been searching the list and reading source code trying to
> figure out if something that acomplishes vendor class ids or user
> class ids has been implemented in u-boot's dhcp services. (microsoft
> has a few articles that discuss uses of class IDS.
> http://support.microsoft.com/kb/266675)
>
> What I am trying to acomplish is this: I would like to be able to set
> slightly different DHCP options when the DHCP request comes from a
> board running u-boot. The point of this is to provide a shorter lease
> time (so we don't exceed the size of the address pool when testing
> boards) and also to allow different TFTP server addresses to be sent
> to these boards.
>
> I see that bp_vend[OPT_SIZE] exists in struct type Bootp_t. Is this a
> vendor class id? I see around line 334 in bootp.c this is coppied from
> BOOTP_VENDOR_MAGIC. Is setting a vendor class ID as simple as setting
> a value for BOOTP_VENDOR_MAGIC in the config file? I cannot find an
> example in any other board files.
>
> Thanks,
>
> Jeffrey Mann
>
>
BOOTP_VENDOR_MAGIC is a fixed value (99.130.83.99) as defined in RFC
1048, (and its successor, RFC 1533). You can implement whatever vendor
extensions you want in U-boot. If you want to use vendor extensions, put
this in your board's config header file:
#define CONFIG_BOOTP_VENDOREX
and supply the following two board functions:
u8 *dhcp_vendorex_prep (u8 *e); /* Function for filling in extensions */
u8 *dhcp_vendorex_proc (u8 *e); /* Function for processing the response */
There are a few boards in the tree that use this. Just grep for
CONFIG_BOOTP_VENDOREX
You might want to read this, too, for syntax etc.:
http://www.faqs.org/rfcs/rfc1533.html
Does this make sense?
regards,
Ben
prev parent reply other threads:[~2007-11-06 16:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-06 15:52 [U-Boot-Users] DHCP vendor or class ID option Jeffrey Mann
2007-11-06 16:37 ` Ben Warren [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47309838.4020705@qstreams.com \
--to=bwarren@qstreams.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox