Contiki 2.5
codeprop-otf.c File Reference

Code propagation and storage. More...

#include <stdio.h>
#include "contiki-net.h"
#include "cfs/cfs.h"
#include "codeprop-otf.h"
#include "loader/elfloader-otf.h"
#include <string.h>

Go to the source code of this file.

Detailed Description

Code propagation and storage.

Author
Adam Dunkels adam@.nosp@m.sics.nosp@m..se

This file implements a simple form of code propagation, which allows a binary program to be downloaded and propagated throughout a network of devices.

Features:

Commands: load code, start code Point-to-point download over TCP Point-to-multipoint delivery over UDP broadcasts Versioning of code modules

Procedure:

  1. Receive code over TCP
  2. Send code packets over UDP

When a code packet is deemed to be missed, a NACK is sent. If a NACK is received, the sending restarts at the point in the binary where the NACK pointed to. (This is not very efficient, but simple to implement...)

States:

Receiving code header -> receiving code -> sending code

Definition in file codeprop-otf.c.