Specify port usage for each partition

The inter-partition ports are dedicated to some partitions. Consequently, we have to specify in the configuration code which partition is allowed to read/write which port.

We do that with two arrays : pok_ports_nb_ports_by_partition and pok_ports_by_partition.

The pok_ports_nb_ports_by_partition indicates for each partition, the number of ports allocated. In the same manner, the pok_ports_by_partition indicate an array that contains the global ports identifiers allowed for this partition.

An example is provided. In this example, we see that the first partition has one port and the identifier of this port is node1_partition_secret_outgoing.

   uint8_t node1_partition_secret_partport[1] =
      {node1_partition_secret_outgoing};

   uint8_t node1_partition_topsecret_partport[1] =
      {node1_partition_topsecret_outgoing};

   uint8_t node1_partition_unclassified_partport[1] =
      {node1_partition_unclassified_outgoing};


   uint8_t pok_ports_nb_ports_by_partition[POK_CONFIG_NB_PARTITIONS] =
      {1,1,1};

   uint8_t* pok_ports_by_partition[POK_CONFIG_NB_PARTITIONS] =
      {node1_partition_secret_partport,
       node1_partition_topsecret_partport,
       node1_partition_unclassified_partport};

When you use code generation functionnalities, this declaration is automatically created in the deployment.c file.



Copyright 2009 POK Team