~ubuntu-branches/ubuntu/trusty/grub2/trusty-updates

« back to all changes in this revision

Viewing changes to include/grub/net/netbuff.h

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-09-13 18:02:04 UTC
  • mfrom: (1.17.15 upstream)
  • mto: (17.6.27 experimental)
  • mto: This revision was merged to the branch mainline in revision 145.
  • Revision ID: package-import@ubuntu.com-20120913180204-mojnmocbimlom4im
Tags: upstream-2.00
ImportĀ upstreamĀ versionĀ 2.00

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef GRUB_NETBUFF_HEADER
 
2
#define GRUB_NETBUFF_HEADER
 
3
 
 
4
#include <grub/misc.h>
 
5
 
 
6
#define NETBUFF_ALIGN 2048
 
7
#define NETBUFFMINLEN 64
 
8
 
 
9
struct grub_net_buff
 
10
{
 
11
  /* Pointer to the start of the buffer.  */
 
12
  grub_uint8_t *head;
 
13
  /* Pointer to the data.  */
 
14
  grub_uint8_t *data;
 
15
  /* Pointer to the tail.  */
 
16
  grub_uint8_t *tail;
 
17
  /* Pointer to the end of the buffer.  */
 
18
  grub_uint8_t *end;
 
19
};
 
20
 
 
21
grub_err_t grub_netbuff_put (struct grub_net_buff *net_buff, grub_size_t len);
 
22
grub_err_t grub_netbuff_unput (struct grub_net_buff *net_buff, grub_size_t len);
 
23
grub_err_t grub_netbuff_push (struct grub_net_buff *net_buff, grub_size_t len);
 
24
grub_err_t grub_netbuff_pull (struct grub_net_buff *net_buff, grub_size_t len);
 
25
grub_err_t grub_netbuff_reserve (struct grub_net_buff *net_buff, grub_size_t len);
 
26
grub_err_t grub_netbuff_clear (struct grub_net_buff *net_buff);
 
27
struct grub_net_buff * grub_netbuff_alloc (grub_size_t len);
 
28
void grub_netbuff_free (struct grub_net_buff *net_buff);
 
29
 
 
30
#endif