Step 2: Adjust Contiki - michaelkirsche/6lowpan4omnet-diy GitHub Wiki

Small changes in Contiki are necessary to use its 6LoWPAN implementation within OMNeT++. Pre-adjusted files for Contiki-v2.6 are included in the release. Copy the files from the 2_contiki_adjustments folder to your Contiki installation. If you (a) want to adjust your Contiki release manually or (b) use a bleeding edge Git version of Contiki, please follow these steps to adjust your installation manually.

First, remove the static keywords from the following variables inside the sicslowpan.c file, located in e.g., /contiki/core/net/sicslowpan.c.

  • uint8_t *rime_ptr
  • uint16_t sicslowpan_len
  • uip_buf_t sicslowpan_aligned_buf
  • uint16_t processed_ip_in_len
  • uint16_t my_tag
  • uint16_t reass_tag
  • struct timer reass_timer
  • struct sicslowpan_addr_context addr_contexts[SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS]

Second, you also need to disable the posting of (synchronous and asynchronous) events, as we do not use or need them:

  • in /contiki/core/sys/process.h:
    • ⇒ disable/comment out CCIF int process_post(struct process *p, process_event_t ev, void* data);
    • ⇒ disable/comment out CCIF void process_post_synch(struct process *p, process_event_t ev, void* data);

>>> Goto Step 3 - Compile Contiki