Ip2Nic¶
Package: simu5g.stack.ip2nic
simple module Ip2Nic
Bridges the IP network layer and the cellular protocol stack, handling bidirectional packet flow. Extracts flow information from IP headers and attaches it as control tags for the stack. In base stations, determines the destination user equipment from IP addresses.
A packet whose UE is attached with neither of its stacks is dropped here. Which stack carries a flow follows from the UE’s attachment: outside dual connectivity a UE is attached with at most one stack, and under dual connectivity the two stacks are the legs of one bearer, so the choice is made per PDU, further down, by the bearer’s leg splitter (see DcPdcpLegSplitter).
Usage diagram¶
Inheritance diagram¶
Used in compound modules¶
Name |
Type |
Description |
|---|---|---|
compound module |
The LteNicBase module serves as the foundational building block for LTE networking in Simu5G. It integrates protocols for LTE communication, including PDCP, RLC, MAC, and PHY layers. This base module allows higher-level modules, such as User Equipment (UE) and eNodeB (evolved Node B), to configure and utilize these layers according to their specific requirements. |
Known subclasses¶
Name |
Type |
Description |
|---|---|---|
simple module |
Device-to-Device (D2D) aware version of Ip2Nic. It overrides the packet analysis and next-hop resolution with the D2D-capable behavior: IP-multicast becomes a D2D_MULTI flow with a group-id assignment, unicast destinations get a D2D peer lookup, and the next hop is routed directly to the peer when the peering is in Direct Mode (DM). Selected by the D2D-capable NICs. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
nodeType |
string |
||
binderModule |
string |
“binder” |
|
connectionControlModule |
string |
“^.rrc.connectionControl” |
The node’s control-plane entry point, asked for a bearer on a lookup miss |
isNr |
bool |
false |
True for the NR leg (set by NrNicUe/NrNicEnb, or in the ini for a DC master eNB) |
hasSdap |
bool |
false |
When true, SDAP handles DRB/RLC assignment; Ip2Nic skips traffic classification |
sessionType |
string |
“” |
UE only: the type of the UE’s session (see LteUe), which the payload the NIC delivers up is of; set by the NIC |
establishBearersOnDemand |
bool |
true |
When false, a packet that finds no established bearer raises an error instead of establishing one (static bearers are established up front; see the staticDrbs parameter of BearerConfigurator) |
Properties¶
Name |
Value |
Description |
|---|---|---|
display |
i=block/layer |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
upperLayerIn |
input |
Connection to network layer |
|
upperLayerOut |
output |
||
stackIn |
input |
Connection to the cellular stack |
|
stackOut |
output |
Source code¶
//
// Bridges the IP network layer and the cellular protocol stack, handling bidirectional packet flow.
// Extracts flow information from IP headers and attaches it as control tags for the stack.
// In base stations, determines the destination user equipment from IP addresses.
//
// A packet whose UE is attached with neither of its stacks is dropped here. Which stack
// carries a flow follows from the UE's attachment: outside dual connectivity a UE is
// attached with at most one stack, and under dual connectivity the two stacks are the
// legs of one bearer, so the choice is made per PDU, further down, by the bearer's leg
// splitter (see ~DcPdcpLegSplitter).
//
simple Ip2Nic like INetworkLayer2CellularNic
{
parameters:
string nodeType;
string binderModule = default("binder");
string connectionControlModule = default("^.rrc.connectionControl"); // The node's control-plane entry point, asked for a bearer on a lookup miss
bool isNr = default(false); // True for the NR leg (set by NrNicUe/NrNicEnb, or in the ini for a DC master eNB)
bool hasSdap = default(false); // When true, SDAP handles DRB/RLC assignment; Ip2Nic skips traffic classification
string sessionType = default(""); // UE only: the type of the UE's session (see ~LteUe), which the payload the NIC delivers up is of; set by the NIC
bool establishBearersOnDemand = default(true); // When false, a packet that finds no established bearer raises an error instead of establishing one (static bearers are established up front; see the staticDrbs parameter of ~BearerConfigurator)
@display("i=block/layer");
gates:
// Connection to network layer
input upperLayerIn;
output upperLayerOut;
// Connection to the cellular stack
input stackIn;
output stackOut;
}