Contiki 2.5
uip-packetqueue.h
1 #ifndef UIP_PACKETQUEUE_H
2 #define UIP_PACKETQUEUE_H
3 
4 #include "sys/ctimer.h"
5 
6 struct uip_packetqueue_handle;
7 
8 struct uip_packetqueue_packet {
9  struct uip_ds6_queued_packet *next;
10  uint8_t queue_buf[UIP_BUFSIZE - UIP_LLH_LEN];
11  uint16_t queue_buf_len;
12  struct ctimer lifetimer;
13  struct uip_packetqueue_handle *handle;
14 };
15 
16 struct uip_packetqueue_handle {
17  struct uip_packetqueue_packet *packet;
18 };
19 
20 void uip_packetqueue_new(struct uip_packetqueue_handle *handle);
21 
22 
23 struct uip_packetqueue_packet *
24 uip_packetqueue_alloc(struct uip_packetqueue_handle *handle, clock_time_t lifetime);
25 
26 
27 void
28 uip_packetqueue_free(struct uip_packetqueue_handle *handle);
29 
30 uint8_t *uip_packetqueue_buf(struct uip_packetqueue_handle *h);
31 uint16_t uip_packetqueue_buflen(struct uip_packetqueue_handle *h);
32 void uip_packetqueue_set_buflen(struct uip_packetqueue_handle *h, uint16_t len);
33 
34 
35 #endif /* UIP_PACKETQUEUE_H */