The kernel must know the kind of each port (queuing or sampling). We specify
that requirement with the pok_ports_kind array. There is an
example of a such declaration below.
pok_port_kind_t pok_ports_kind[POK_CONFIG_NB_PORTS] =
{POK_PORT_KIND_SAMPLING,POK_PORT_KIND_SAMPLING,POK_PORT_KIND_SAMPLING};
Here, the three local ports are sampling ports. You can have three kind of
ports:
- Sampling ports (POK_PORT_KIND_SAMPLING) : stores data but does not queue them.
- Queuing ports (POK_PORT_KIND_QUEUEING) : queues every new instance of the data.
- Virtual ports (POK_PORT_KIND_VIRTUAL) : this port is not stored in the kernel and this
is a virtual port. This port belongs to another machine. We add it only
to create the routing policy in the distributed network. You cannot
write or read data on/from virtual ports, only get the port identifier
associated with them.
When you use code generation, this declaration is
automatically created in the deployment.c file.
Copyright 2009 POK Team