summaryrefslogtreecommitdiffstats
path: root/lib/edioutput/Transport.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-05-11 21:03:36 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-05-11 21:03:36 +0200
commit19d907c885081a3218d81705fd45870b10f99d8d (patch)
tree2a56f22a1b4d5ba1d2d2619725899d5f49e260e9 /lib/edioutput/Transport.cpp
parent3a8a2aa8b682545a2a18bf24975555c7eb07152c (diff)
downloaddabmux-19d907c885081a3218d81705fd45870b10f99d8d.tar.gz
dabmux-19d907c885081a3218d81705fd45870b10f99d8d.tar.bz2
dabmux-19d907c885081a3218d81705fd45870b10f99d8d.zip
Common: update common code with EDI input changes
Diffstat (limited to 'lib/edioutput/Transport.cpp')
-rw-r--r--lib/edioutput/Transport.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/edioutput/Transport.cpp b/lib/edioutput/Transport.cpp
index 4c91483..d8627fd 100644
--- a/lib/edioutput/Transport.cpp
+++ b/lib/edioutput/Transport.cpp
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2019
+ Copyright (C) 2020
Matthias P. Braendli, matthias.braendli@mpb.li
http://www.opendigitalradio.org
@@ -33,7 +33,7 @@ namespace edi {
void configuration_t::print() const
{
- etiLog.level(info) << "EDI";
+ etiLog.level(info) << "EDI Output";
etiLog.level(info) << " verbose " << verbose;
for (auto edi_dest : destinations) {
if (auto udp_dest = dynamic_pointer_cast<edi::udp_destination_t>(edi_dest)) {
@@ -67,7 +67,7 @@ Sender::Sender(const configuration_t& conf) :
edi_pft(m_conf)
{
if (m_conf.verbose) {
- etiLog.log(info, "Setup EDI");
+ etiLog.log(info, "Setup EDI Output");
}
for (const auto& edi_dest : m_conf.destinations) {
@@ -104,7 +104,7 @@ Sender::Sender(const configuration_t& conf) :
}
if (m_conf.verbose) {
- etiLog.log(info, "EDI set up");
+ etiLog.log(info, "EDI output set up");
}
}
@@ -118,7 +118,7 @@ void Sender::write(const TagPacket& tagpacket)
vector<edi::PFTFragment> edi_fragments = edi_pft.Assemble(af_packet);
if (m_conf.verbose) {
- fprintf(stderr, "EDI number of PFT fragment before interleaver %zu\n",
+ fprintf(stderr, "EDI Output: Number of PFT fragment before interleaver %zu\n",
edi_fragments.size());
}
@@ -127,7 +127,7 @@ void Sender::write(const TagPacket& tagpacket)
}
if (m_conf.verbose) {
- fprintf(stderr, "EDI number of PFT fragments %zu\n",
+ fprintf(stderr, "EDI Output: Number of PFT fragments %zu\n",
edi_fragments.size());
}
@@ -169,6 +169,12 @@ void Sender::write(const TagPacket& tagpacket)
Socket::InetAddress addr;
addr.resolveUdpDestination(udp_dest->dest_addr, m_conf.dest_port);
+ if (af_packet.size() > 1400 and not m_udp_fragmentation_warning_printed) {
+ fprintf(stderr, "EDI Output: AF packet larger than 1400,"
+ " consider using PFT to avoid UP fragmentation.\n");
+ m_udp_fragmentation_warning_printed = true;
+ }
+
udp_sockets.at(udp_dest.get())->send(af_packet, addr);
}
else if (auto tcp_dest = dynamic_pointer_cast<edi::tcp_server_t>(dest)) {