~ubuntu-branches/ubuntu/trusty/virtualbox-lts-xenial/trusty-proposed

« back to all changes in this revision

Viewing changes to src/VBox/Devices/PC/ipxe/src/include/ipxe/dhcpopts.h

  • Committer: Package Import Robot
  • Author(s): Gianfranco Costamagna
  • Date: 2016-02-23 14:28:26 UTC
  • Revision ID: package-import@ubuntu.com-20160223142826-bdu69el2z6wa2a44
Tags: upstream-4.3.36-dfsg
ImportĀ upstreamĀ versionĀ 4.3.36-dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _IPXE_DHCPOPTS_H
 
2
#define _IPXE_DHCPOPTS_H
 
3
 
 
4
/** @file
 
5
 *
 
6
 * DHCP options
 
7
 *
 
8
 */
 
9
 
 
10
FILE_LICENCE ( GPL2_OR_LATER );
 
11
 
 
12
#include <stdint.h>
 
13
 
 
14
/** A DHCP options block */
 
15
struct dhcp_options {
 
16
        /** Option block raw data */
 
17
        void *data;
 
18
        /** Option block used length */
 
19
        size_t used_len;
 
20
        /** Option block allocated length */
 
21
        size_t alloc_len;
 
22
        /** Reallocate option block raw data
 
23
         *
 
24
         * @v options           DHCP option block
 
25
         * @v len               New length
 
26
         * @ret rc              Return status code
 
27
         */
 
28
        int ( * realloc ) ( struct dhcp_options *options, size_t len );
 
29
};
 
30
 
 
31
extern int dhcpopt_applies ( unsigned int tag );
 
32
extern int dhcpopt_store ( struct dhcp_options *options, unsigned int tag,
 
33
                           const void *data, size_t len );
 
34
extern int dhcpopt_fetch ( struct dhcp_options *options, unsigned int tag,
 
35
                           void *data, size_t len );
 
36
extern void dhcpopt_init ( struct dhcp_options *options,
 
37
                           void *data, size_t alloc_len,
 
38
                           int ( * realloc ) ( struct dhcp_options *options,
 
39
                                               size_t len ) );
 
40
extern void dhcpopt_update_used_len ( struct dhcp_options *options );
 
41
extern int dhcpopt_no_realloc ( struct dhcp_options *options, size_t len );
 
42
 
 
43
#endif /* _IPXE_DHCPOPTS_H */