# pbuf.h File Reference

`#include "net/debug.h"`
`#include "net/arch.h"`

Go to the source code of this file.

## Data Structures

struct | pbuf

## Defines

#define | PBUF_TRANSPORT_HLEN 20
#define | PBUF_IP_HLEN 20
#define | PBUF_FLAG_RAM 0x00
#define | PBUF_FLAG_ROM 0x01
#define | PBUF_FLAG_POOL 0x02

## Enumerations

enum | pbuf_layer { PBUF_TRANSPORT, PBUF_IP, PBUF_LINK, PBUF_RAW }
enum | pbuf_flag { PBUF_RAM, PBUF_ROM, PBUF_POOL }

## Functions

void | pbuf_init (void)
pbuf * | pbuf_alloc (pbuf_layer l, uInt16 size, pbuf_flag flag)
void | pbuf_realloc (struct pbuf *p, uInt16 size)
uInt8 | pbuf_header (struct pbuf *p, Int16 header_size)
void | pbuf_ref (struct pbuf *p)
uInt8 | pbuf_free (struct pbuf *p)
uInt8 | pbuf_clen (struct pbuf *p)
void | pbuf_chain (struct pbuf *h, struct pbuf *t)
pbuf * | pbuf_dechain (struct pbuf *p)

## Define Documentation

#define PBUF_FLAG_POOL 0x02

#define PBUF_FLAG_RAM 0x00

#define PBUF_FLAG_ROM 0x01

#define PBUF_IP_HLEN 20

#define PBUF_TRANSPORT_HLEN 20

## Enumeration Type Documentation

enum pbuf_flag

Enumeration values:

  PBUF_RAM |
  PBUF_ROM |
  PBUF_POOL |

enum pbuf_layer

Enumeration values:

  PBUF_TRANSPORT |
  PBUF_IP |
  PBUF_LINK |
  PBUF_RAW |

## Function Documentation

struct pbuf* pbuf_alloc | ( | pbuf_layer | l,
|  | uInt16 | size,
|  | pbuf_flag | flag
| ) |

void pbuf_chain | ( | struct pbuf * | h,
|  | struct pbuf * | t
| ) |

uInt8 pbuf_clen | ( | struct pbuf * | p | ) |

struct pbuf* pbuf_dechain | ( | struct pbuf * | p | ) |

uInt8 pbuf_free | ( | struct pbuf * | p | ) |

uInt8 pbuf_header | ( | struct pbuf * | p,
|  | Int16 | header_size
| ) |

void pbuf_init | ( | void |  | ) |

void pbuf_realloc | ( | struct pbuf * | p,
|  | uInt16 | size
| ) |

void pbuf_ref | ( | struct pbuf * | p | ) |