Networking Reference
In-Depth Information
count = op_topo_assoc_count(mod_id, \
OPC_TOPO_ASSOC_OUT, OPC_OBJTYPE_STRM);
found = FALSE;
for (i = 0; i < count; ++i)
{
strm_id = op_topo_assoc(mod_id, \
OPC_TOPO_ASSOC_OUT, OPC_OBJTYPE_STRM, i);
tx_id = op_topo_assoc(strm_id, \
OPC_TOPO_ASSOC_OUT, OPC_OBJTYPE_PTTX, 0);
if (op_topo_assoc_count(tx_id, OPC_TOPO_ASSOC_OUT,\
OPC_OBJTYPE_LKDUP) == 0)
continue ;
link_id = op_topo_assoc(tx_id, OPC_TOPO_ASSOC_OUT, \
OPC_OBJTYPE_LKDUP, 0);
count2 = op_topo_assoc_count(link_id, \
OPC_TOPO_ASSOC_OUT, OPC_OBJTYPE_NODE_FIX);
for (j = 0; j < count2; ++j)
{
tmp_node_id = op_topo_assoc(link_id, \
OPC_TOPO_ASSOC_OUT, OPC_OBJTYPE_NODE_FIX, j);
if (tmp_node_id == next_hop_node_id)
{
op_ima_obj_attr_get(strm_id, "srcstream", \
&out_port);
found = TRUE;
break ;
}
}
if (found == TRUE)
break ;
}
Code in “slot” state
Figure 7.6
segmented without knowing the boundaries of packets, and at the other end the segments
are reassembled into original source packets. In this section, two cases will be modeled:
one is single ƀow, another is a trunk of ƀows. Here, ƀow is the same as connection in
general, i.e., all segments within the same ƀow have a common feature, like the same
destination address.
7.2.1
Single flow
First, you need to create a node model that is capable of making source packets intoƀow
segments at one end and recovering source packets fromƀow segments at another end.
 
Search MirCeyron ::




Custom Search