55 |
|
|
56 |
/* Definitions for the pbuf flag field (these are not the flags that |
/* Definitions for the pbuf flag field (these are not the flags that |
57 |
are passed to pbuf_alloc()). */ |
are passed to pbuf_alloc()). */ |
58 |
#define PBUF_FLAG_RAM 0x00 /* Flags that pbuf data is stored in RAM */ |
#define PBUF_FLAG_RAM 0x00U /* Flags that pbuf data is stored in RAM */ |
59 |
#define PBUF_FLAG_ROM 0x01 /* Flags that pbuf data is stored in ROM */ |
#define PBUF_FLAG_ROM 0x01U /* Flags that pbuf data is stored in ROM */ |
60 |
#define PBUF_FLAG_POOL 0x02 /* Flags that the pbuf comes from the pbuf pool */ |
#define PBUF_FLAG_POOL 0x02U /* Flags that the pbuf comes from the pbuf pool */ |
61 |
#define PBUF_FLAG_REF 0x04 /* Flags thet the pbuf payload refers to RAM */ |
#define PBUF_FLAG_REF 0x04U /* Flags thet the pbuf payload refers to RAM */ |
62 |
|
|
63 |
|
/** indicates this packet was broadcast on the link */ |
64 |
|
#define PBUF_FLAG_LINK_BROADCAST 0x80U |
65 |
|
|
66 |
struct pbuf { |
struct pbuf { |
67 |
/** next pbuf in singly linked pbuf chain */ |
/** next pbuf in singly linked pbuf chain */ |
72 |
|
|
73 |
/** |
/** |
74 |
* total length of this buffer and all next buffers in chain |
* total length of this buffer and all next buffers in chain |
75 |
* invariant: p->tot_len == p->len + (p->next? p->next->tot_len: 0) |
* belonging to the same packet. |
76 |
|
* |
77 |
|
* For non-queue packet chains this is the invariant: |
78 |
|
* p->tot_len == p->len + (p->next? p->next->tot_len: 0) |
79 |
*/ |
*/ |
80 |
u16_t tot_len; |
u16_t tot_len; |
81 |
|
|
109 |
u8_t pbuf_free(struct pbuf *p); |
u8_t pbuf_free(struct pbuf *p); |
110 |
u8_t pbuf_clen(struct pbuf *p); |
u8_t pbuf_clen(struct pbuf *p); |
111 |
void pbuf_chain(struct pbuf *h, struct pbuf *t); |
void pbuf_chain(struct pbuf *h, struct pbuf *t); |
|
struct pbuf *pbuf_dechain(struct pbuf *p); |
|
112 |
struct pbuf *pbuf_take(struct pbuf *f); |
struct pbuf *pbuf_take(struct pbuf *f); |
113 |
|
#if 0 /* see remark in code */ |
114 |
|
struct pbuf *pbuf_dechain(struct pbuf *p); |
115 |
|
#endif |
116 |
|
|
117 |
#endif /* __LWIP_PBUF_H__ */ |
#endif /* __LWIP_PBUF_H__ */ |