4/17/17
SigMRF Users Guide, Rev A2
Copyright
Signalogic, Inc. 2016-2017
23 / 39
};
};
};
};
#ifdef __cplusplus
extern
"C"
{
{
{
{
#endif
/* Session management APIs:
-DSSessionCreate() - create a session to send and/or receive packets on one of following
network interfaces:
-none [default]
-server motherboard
-network I/O add-in card
-coCPU card including network I/O
and returns a session handle (sessionHandle) for use with other packet flow APIs.
If no network I/O interface is specified, then during subsequent API calls the session is
matched to packets using IP and UDP header hashing. networkIfName examples include:
-eth0, em1 ... # motherboard NIC
-p2p1, p6p1 ... # add-in card or coCPU card
One each of following operating modes, data flow paths, and timing values should be
specified:
-frames only (no packet headers) [default]
-packet flow with IP/UDP/RTP header
-packet flow with UDP/RTP header
-Linux sockets [default]
-DPDK queue
-coCPU queue
-0 -- none, DSSessionTranscode() or other APIs are called by application code based on a
user-defined timing. This should be used with frame mode [default]
-N -- internal SigMRF timing is used and packet and codec related APIs are explicitly
called every N msec
The following attributes may be specified:
-no jitter buffer [default]
-use the SigMRF internal jitter buffer
-use the codec built-in jitter buffer (if there is one given by the codec spec)
Notes:
-if no network interface is given, DSFormatPackets, DSBufferPackets, and
DSGetOrderedPackets APIs may be used but not DSSendPackets and DSRecvPackets
-if a coCPU card, DPDK cores, or specific Linux cores should be used, in either frame or
packet flow modes, then DSAssignDataPlane() must be called first to obtain a data
plane handle (dpHandle). If DSAssignDataPlane() is not called (i.e. a NULL dpHandle is
used), then SigMRF will use generic multithreading for session handling, and resource
management APIs are disabled
-any call to DSSessionCreate() will create and run the internal SigMRF process (if needed
based on parameters)
-DSSessionTranscode() -- transcodes one or more packets based on codecs, ptime, and other
pSessionData params specified in DSSessionCreate(). Notes:
-calls DSCodecEncode() and/or DSCodecDecode()
-calls DSBufferPackets(), DSGetOrderedPackets() and DSFormatPackets() if a packet mode was
given in DSSessionCreate()
-calls DSSendPackets() and DSRecvPackets() if a network interface was given in
DSSessionCreate()
-DSSessionDelete() - delete an existing session. Notes:
-the last session deleted will stop and remove the internal SigMRF process (if it was
running)
*/
HSESSION
DSSessionCreate(
(
(
(
void
*
*
*
*
dpHandle,
,
,
,
char
*
*
*
*
networkIfName,
,
,
,
SESSION_DATA*
*
*
*
pSessionData,
,
,
,
unsigned
int
uFlags);
);
);
);
int
DSSessionTranscode(
(
(
(HSESSION
sessionHandle,
,
,
,
unsigned
int
uFlags,
,
,
,
uint8_t*
*
*
*
pkts);
);
);
);
int
DSSessionDelete(
(
(
(HSESSION
sessionHandle,
,
,
,
unsigned
int
uFlags);
);
);
);