Contiki 2.5
Data Structures | Functions
bundle.h File Reference

this file defines the bundle memory representation More...

#include <stdint.h>
#include "contiki.h"
#include "mmem.h"
#include "net/rime/rimeaddr.h"
#include "process.h"
#include "packetbuf.h"

Go to the source code of this file.

Data Structures

struct  bundle_t
 this struct defines the bundle for internal processing More...
 

Functions

struct mmem * bundle_recover_bundle (uint8_t *buffer, int size)
 generates the bundle struct from raw data More...
 
int bundle_encode_bundle (struct mmem *bundlemem, uint8_t *buffer, int max_len)
 Encodes the bundle to raw data. More...
 
uint8_t bundle_set_attr (struct mmem *bundlemem, uint8_t attr, uint32_t *val)
 sets an attribute of a bundle More...
 
uint8_t bundle_get_attr (struct mmem *bundlemem, uint8_t attr, uint32_t *val)
 Gets an attribute of a bundle. More...
 
struct mmem * bundle_create_bundle ()
 Get a new bundle structure allocated. More...
 
uint16_t bundle_delete_bundle (struct mmem *bundlemem)
 free a given MMEM allocation of a bundle struct More...
 
int bundle_add_block (struct mmem *bundlemem, uint8_t type, uint8_t flags, uint8_t *data, uint8_t d_len)
 Add a block to a bundle. More...
 
struct bundle_block_t * bundle_get_block (struct mmem *bundlemem, uint8_t i)
 Returns a pointer a bundle block. More...
 
struct bundle_block_t * bundle_get_block_by_type (struct mmem *bundlemem, uint8_t type)
 Returns pointer to first bundle block of specific type. More...
 
struct bundle_block_t * bundle_get_payload_block (struct mmem *bundlemem)
 Returns pointer to bundle payload block. More...
 
rimeaddr_t convert_eid_to_rime (uint32_t eid)
 converts IPN EIDs (uint32_t) into the RIME address
 
uint32_t convert_rime_to_eid (rimeaddr_t *dest)
 converts a RIME address into an IPN EID
 
int bundle_decrement (struct mmem *bundlemem)
 Decrements the reference counter for a MMEM struct containing a bundle Frees the struct when reference counter is down to 0. More...
 
int bundle_increment (struct mmem *bundlemem)
 Increments the reference counter for a MMEM struct containing a bundle. More...
 

Detailed Description

this file defines the bundle memory representation

Author
Georg von Zengen (vonze.nosp@m.ng@i.nosp@m.br.cs.nosp@m..tu-.nosp@m.bs.de)
Daniel Willmann danie.nosp@m.l@to.nosp@m.talue.nosp@m.berw.nosp@m.achun.nosp@m.g.de
Wolf-Bastian Poettner poett.nosp@m.ner@.nosp@m.ibr.c.nosp@m.s.tu.nosp@m.-bs.d.nosp@m.e

Definition in file bundle.h.