4/17/17
SigMRF Users Guide, Rev A2
Copyright
Signalogic, Inc. 2016-2017
24 / 39
/* Packet flow and processing APIs:
-DSRecvPackets() - receive all available packets associated with the session handle. Network
I/O interfaces and data flow paths are same as specified for DSSendPacket(). Notes:
-block until a packet is avaiable - default behavior
-immediately return whether or not a packet is available
-if DS_RECV_PKT_ADDTOJITTERBUFFER is given then packets are added to the SigMRF internal
jitter buffer
-TODO: add interrupt based operation
-TODO: add - setup a callback function to be automatically called whenever a packet is
available
-DSSendPackets() - send one or more packets using the network I/O interface and data flow
path associated with the session handle
-DSFormatPackets() - format one or more packets for sending, but don't send. Notes:
-if DS_SEND_PKT_FMT is given then DSFormatPackets() is called
-if the session handle is NULL, then packets are matched to an existing session using IP
and UDP info hashing techniques
*/
int
DSRecvPackets(
(
(
(HSESSION
sessionHandle,
,
,
,
unsigned
int
uFlags,
,
,
,
uint8_t*
*
*
*
pkts);
);
);
);
int
DSSendPackets(
(
(
(HSESSION
sessionHandle,
,
,
,
unsigned
int
uFlags,
,
,
,
uint8_t*
*
*
*
pkts);
);
);
);
int
DSFormatPackets(
(
(
(HSESSION
sessionHandle,
,
,
,
unsigned
int
uFlags,
,
,
,
uint8_t*
*
*
*
pkts);
);
);
);
/* Jitter buffer APIs:
-DSBufferPackets() - add one or more packets to the SigMRF internal jitter buffer. Notes:
-should not be used -- or used very carefully -- if DSRecvPackets() is called with
DS_RECV_PKT_ADDTOJITTERBUFFER
-if the session handle is NULL, then packets are matched to an existing session using IP
and UDP info hashing techniques
-DSGetOrderedPackets() -- get one or more packets from the SigMRF internal jitter buffer.
Notes:
-if the session handle is NULL, then packets are matched to an existing session using IP
and UDP info hashing techniques
*/
int
DSBufferPackets(
(
(
(HSESSION
sessionHandle,
,
,
,
unsigned
int
uFlags,
,
,
,
uint8_t*
*
*
*
pkts);
);
);
);
int
DSGetOrderedPackets(
(
(
(HSESSION
sessionHandle,
,
,
,
unsigned
int
uFlags,
,
,
,
uint8_t*
*
*
*
pkts);
);
);
);
/* DSCreateSession() definitions */
#define DS_SESSION_MODE_FRAME 1
/* session data in frame format */
#define DS_SESSION_MODE_IPPACKET 2
/* session data in IP/UDP/RTP packet format */
#define DS_SESSION_MODE_UDPPACKET 3
/* session data in UDP/RTP packet format */
#define DS_SESSION_LINUX_SOCKETS 0x10
/* packet flow path is Linux sockets */
#define DS_SESSION_DPDK_QUEUE 0x20
/* packet flow path is DPDK mem queue */
#define DS_SESSION_COCPU_QUEUE 0x40
/* In frame operating mode, frame flow path is
coCPU card mem queue. In packet operating mode, packets flow through-CPU card mem queue but are
not processed on the card */
#define DS_SESSION_NO_JITTERBUFFER 0x0
#define DS_SESSION_USE_JITTERBUFFER 0x1000
/* DSRecvPackets() definitions */
#define DS_RECV_PKT_ADDTOJITTERBUFFER 0x1
/* DSSendPackets() definitions */
#define DS_SEND_PKT_FMT 0x1
#ifdef __cplusplus
}
}
}
}
#endif
#endif
/* _PKTLIB_H_ */