Contiki-NG

6top Protocol (6P) Packet Manipulation APIs More...

Go to the source code of this file.

Data Structures

union  sixp_pkt_code_t
 6P Codes integrating Command IDs and Return Codes More...
 
struct  sixp_pkt_t
 6top IE Structure More...
 

Enumerations

enum  sixp_pkt_type_t { SIXP_PKT_TYPE_REQUEST = 0x00 , SIXP_PKT_TYPE_RESPONSE = 0x01 , SIXP_PKT_TYPE_CONFIRMATION = 0x02 , SIXP_PKT_TYPE_RESERVED = 0x03 }
 6P Message Types More...
 
enum  sixp_pkt_cmd_t {
  SIXP_PKT_CMD_ADD = 0x01 , SIXP_PKT_CMD_DELETE = 0x02 , SIXP_PKT_CMD_RELOCATE = 0x03 , SIXP_PKT_CMD_COUNT = 0x04 ,
  SIXP_PKT_CMD_LIST = 0x05 , SIXP_PKT_CMD_SIGNAL = 0x06 , SIXP_PKT_CMD_CLEAR = 0x07 , SIXP_PKT_CMD_UNAVAILABLE = 0xff
}
 6P Command Identifiers More...
 
enum  sixp_pkt_rc_t {
  SIXP_PKT_RC_SUCCESS = 0x00 , SIXP_PKT_RC_EOL = 0x01 , SIXP_PKT_RC_ERR = 0x02 , SIXP_PKT_RC_RESET = 0x03 ,
  SIXP_PKT_RC_ERR_VERSION = 0x04 , SIXP_PKT_RC_ERR_SFID = 0x05 , SIXP_PKT_RC_ERR_SEQNUM = 0x06 , SIXP_PKT_RC_ERR_CELLLIST = 0x07 ,
  SIXP_PKT_RC_ERR_BUSY = 0x08 , SIXP_PKT_RC_ERR_LOCKED = 0x09 , SIXP_PKT_RC_RESERVED = 0xff
}
 6P Return Codes More...
 
enum  sixp_pkt_cell_option_t { SIXP_PKT_CELL_OPTION_TX = 0x01 , SIXP_PKT_CELL_OPTION_RX = 0x02 , SIXP_PKT_CELL_OPTION_SHARED = 0x04 }
 6P Cell Options More...
 

Functions

int sixp_pkt_set_metadata (sixp_pkt_type_t type, sixp_pkt_code_t code, sixp_pkt_metadata_t metadata, uint8_t *body, uint16_t body_len)
 Write Metadata into "Other Fields" of 6P packet. More...
 
int sixp_pkt_get_metadata (sixp_pkt_type_t type, sixp_pkt_code_t code, sixp_pkt_metadata_t *metadata, const uint8_t *body, uint16_t body_len)
 Read Metadata stored in "Other Fields" of 6P packet. More...
 
int sixp_pkt_set_cell_options (sixp_pkt_type_t type, sixp_pkt_code_t code, sixp_pkt_cell_options_t cell_options, uint8_t *body, uint16_t body_len)
 Write CellOptions in "Other Fields" of 6P packet. More...
 
int sixp_pkt_get_cell_options (sixp_pkt_type_t type, sixp_pkt_code_t code, sixp_pkt_cell_options_t *cell_options, const uint8_t *body, uint16_t body_len)
 Read CellOptions in "Other Fields" of 6P packet. More...
 
int sixp_pkt_set_num_cells (sixp_pkt_type_t type, sixp_pkt_code_t code, sixp_pkt_num_cells_t num_cells, uint8_t *body, uint16_t body_len)
 Write NumCells in "Other Fields" of 6P packet. More...
 
int sixp_pkt_get_num_cells (sixp_pkt_type_t type, sixp_pkt_code_t code, sixp_pkt_num_cells_t *num_cells, const uint8_t *body, uint16_t body_len)
 Read NumCells in "Other Fields" of 6P packet. More...
 
int sixp_pkt_set_reserved (sixp_pkt_type_t type, sixp_pkt_code_t code, sixp_pkt_reserved_t reserved, uint8_t *body, uint16_t body_len)
 Write Reserved in "Other Fields" of 6P packet. More...
 
int sixp_pkt_get_reserved (sixp_pkt_type_t type, sixp_pkt_code_t code, sixp_pkt_reserved_t *reserved, const uint8_t *body, uint16_t body_len)
 Read Reserved in "Other Fields" of 6P packet. More...
 
int sixp_pkt_set_offset (sixp_pkt_type_t type, sixp_pkt_code_t code, sixp_pkt_offset_t offset, uint8_t *body, uint16_t body_len)
 Write Offset in "Other Fields" of 6P packet. More...
 
int sixp_pkt_get_offset (sixp_pkt_type_t type, sixp_pkt_code_t code, sixp_pkt_offset_t *offset, const uint8_t *body, uint16_t body_len)
 Read Offset in "Other Fields" of 6P packet. More...
 
int sixp_pkt_set_max_num_cells (sixp_pkt_type_t type, sixp_pkt_code_t code, sixp_pkt_max_num_cells_t max_num_cells, uint8_t *body, uint16_t body_len)
 Write MaxNumCells in "Other Fields" of 6P packet. More...
 
int sixp_pkt_get_max_num_cells (sixp_pkt_type_t type, sixp_pkt_code_t code, sixp_pkt_max_num_cells_t *max_num_cells, const uint8_t *body, uint16_t body_len)
 Read MaxNumCells in "Other Fields" of 6P packet. More...
 
int sixp_pkt_set_cell_list (sixp_pkt_type_t type, sixp_pkt_code_t code, const uint8_t *cell_list, uint16_t cell_list_len, uint16_t offset, uint8_t *body, uint16_t body_len)
 Write CellList in "Other Fields" of 6P packet. More...
 
int sixp_pkt_get_cell_list (sixp_pkt_type_t type, sixp_pkt_code_t code, const uint8_t **cell_list, sixp_pkt_offset_t *cell_list_len, const uint8_t *body, uint16_t body_len)
 Read CellList in "Other Fields" of 6P packet. More...
 
int sixp_pkt_set_rel_cell_list (sixp_pkt_type_t type, sixp_pkt_code_t code, const uint8_t *rel_cell_list, uint16_t rel_cell_list_len, uint16_t offset, uint8_t *body, uint16_t body_len)
 Write RelCellList in "Other Fields" of 6P packet. More...
 
int sixp_pkt_get_rel_cell_list (sixp_pkt_type_t type, sixp_pkt_code_t code, const uint8_t **rel_cell_list, sixp_pkt_offset_t *rel_cell_list_len, const uint8_t *body, uint16_t body_len)
 Read RelCellList in "Other Fields" of 6P packet. More...
 
int sixp_pkt_set_cand_cell_list (sixp_pkt_type_t type, sixp_pkt_code_t code, const uint8_t *cand_cell_list, uint16_t cand_cell_list_len, uint16_t offset, uint8_t *body, uint16_t body_len)
 Write CandCellList in "Other Fields" of 6P packet. More...
 
int sixp_pkt_get_cand_cell_list (sixp_pkt_type_t type, sixp_pkt_code_t code, const uint8_t **cand_cell_list, sixp_pkt_offset_t *cand_cell_list_len, const uint8_t *body, uint16_t body_len)
 Read CandCellList in "Other Fields" of 6P packet. More...
 
int sixp_pkt_set_total_num_cells (sixp_pkt_type_t type, sixp_pkt_code_t code, sixp_pkt_total_num_cells_t total_num_cells, uint8_t *body, uint16_t body_len)
 Write TotalNumCells in "Other Fields" of 6P packet. More...
 
int sixp_pkt_get_total_num_cells (sixp_pkt_type_t type, sixp_pkt_code_t code, sixp_pkt_total_num_cells_t *total_num_cells, const uint8_t *body, uint16_t body_len)
 Read TotalNumCells in "Other Fields" of 6P packet. More...
 
int sixp_pkt_set_payload (sixp_pkt_type_t type, sixp_pkt_code_t code, const uint8_t *payload, uint16_t payload_len, uint8_t *body, uint16_t body_len)
 Write Payload in "Other Fields" of 6P packet. More...
 
int sixp_pkt_get_payload (sixp_pkt_type_t type, sixp_pkt_code_t code, uint8_t *buf, uint16_t buf_len, const uint8_t *body, uint16_t body_len)
 Read Payload in "Other Fields" of 6P packet. More...
 
int sixp_pkt_parse (const uint8_t *buf, uint16_t len, sixp_pkt_t *pkt)
 Parse a 6P packet. More...
 
int sixp_pkt_create (sixp_pkt_type_t type, sixp_pkt_code_t code, uint8_t sfid, uint8_t seqno, const uint8_t *body, uint16_t body_len, sixp_pkt_t *pkt)
 Create a 6P packet. More...
 

Detailed Description

6top Protocol (6P) Packet Manipulation APIs

Author
Shalu R shalu.nosp@m.r@cd.nosp@m.ac.in Lijo Thomas lijo@.nosp@m.cdac.nosp@m..in Yasuyuki Tanaka yasuy.nosp@m.uki..nosp@m.tanak.nosp@m.a@in.nosp@m.f.eth.nosp@m.z.ch

Definition in file sixp-pkt.h.