diff --git a/applications/lofar2/libraries/sdp/src/vhdl/sdp_pkg.vhd b/applications/lofar2/libraries/sdp/src/vhdl/sdp_pkg.vhd
index 7fe6896838ac5d2c86cb3e6e0444368a82759418..f67cdbe446cc79e33e5e9a9a99c1b4a8ea1dbc7e 100644
--- a/applications/lofar2/libraries/sdp/src/vhdl/sdp_pkg.vhd
+++ b/applications/lofar2/libraries/sdp/src/vhdl/sdp_pkg.vhd
@@ -199,7 +199,7 @@ PACKAGE sdp_pkg is
   CONSTANT c_sdp_stat_eth_src_mac_47_16 : STD_LOGIC_VECTOR(31 DOWNTO 0) := x"00228608";  -- 00:22:86:08:pp:qq
   CONSTANT c_sdp_stat_ip_dst_addr       : STD_LOGIC_VECTOR(31 DOWNTO 0) := x"0A6300FE";  -- 0A6300FE = '10.99.0.254' = DOP36-enp2s0
   CONSTANT c_sdp_stat_ip_src_addr_31_16 : STD_LOGIC_VECTOR(15 DOWNTO 0) := x"0A63";    -- 10.99.xx.yy
-  CONSTANT c_sdp_stat_udp_dst_port      : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(5001, 16);
+  CONSTANT c_sdp_stat_udp_dst_port      : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(5001, 16);  -- 0x1389 = 5001
   CONSTANT c_sdp_sst_udp_src_port_15_8  : STD_LOGIC_VECTOR( 7 DOWNTO 0) := x"D0";  -- TBC, 7:0 = gn_id (= ID[7:0] = backplane[5:0] & node[1:0])
   CONSTANT c_sdp_bst_udp_src_port_15_8  : STD_LOGIC_VECTOR( 7 DOWNTO 0) := x"D1";  -- TBC
   CONSTANT c_sdp_xst_udp_src_port_15_8  : STD_LOGIC_VECTOR( 7 DOWNTO 0) := x"D2";  -- TBC
@@ -319,7 +319,7 @@ PACKAGE sdp_pkg is
   CONSTANT c_sdp_cep_ip_src_addr_31_16 : STD_LOGIC_VECTOR(15 DOWNTO 0) := x"C0A8";      -- 31:16, 15:8 = backplane, 7:0 = node + 1 = 192.168.xx.yy
   CONSTANT c_sdp_cep_ip_total_length   : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(7868, 16);  -- see ICD STAT-CEP
   CONSTANT c_sdp_cep_udp_total_length  : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(7848, 16);  -- see ICD STAT-CEP
-  CONSTANT c_sdp_cep_udp_dst_port      : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(5000, 16);
+  CONSTANT c_sdp_cep_udp_dst_port      : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(5000, 16);  -- 0x1380 = 5000
   CONSTANT c_sdp_cep_udp_src_port_15_8 : STD_LOGIC_VECTOR( 7 DOWNTO 0) := x"D0";        -- 15:8, 7:0 = gn_id (= ID[7:0] = backplane[5:0] & node[1:0])
 
   CONSTANT c_sdp_cep_app_header_len    : NATURAL := 32;
@@ -567,6 +567,7 @@ PACKAGE sdp_pkg is
   FUNCTION func_sdp_get_stat_app_total_length(g_statistics_type : STRING) RETURN NATURAL;
   FUNCTION func_sdp_get_stat_udp_total_length(g_statistics_type : STRING) RETURN NATURAL;
   FUNCTION func_sdp_get_stat_ip_total_length(g_statistics_type : STRING) RETURN NATURAL;
+  FUNCTION func_sdp_get_stat_udp_src_port(g_statistics_type : STRING; gn_index : NATURAL) RETURN STD_LOGIC_VECTOR;
   FUNCTION func_sdp_get_stat_nof_packets(g_statistics_type : STRING; S_pn, P_sq, N_crosslets : NATURAL) RETURN NATURAL;
   FUNCTION func_sdp_get_stat_nof_packets(g_statistics_type : STRING) RETURN NATURAL;  -- use c_sdp_S_pn, c_sdp_P_sq, c_sdp_N_crosslets_max
 
@@ -703,6 +704,14 @@ PACKAGE BODY sdp_pkg IS
     RETURN c_sdp_udp_total_length + c_network_ip_header_len;
   END func_sdp_get_stat_ip_total_length;
 
+  FUNCTION func_sdp_get_stat_udp_src_port(g_statistics_type : STRING; gn_index : NATURAL) RETURN STD_LOGIC_VECTOR IS
+    CONSTANT c_gn_index : STD_LOGIC_VECTOR(7 DOWNTO 0) := TO_UVEC(gn_index, 8);
+  BEGIN
+    RETURN sel_a_b(g_statistics_type="BST", c_sdp_bst_udp_src_port_15_8 & c_gn_index,    -- BST = 0xD0 & gn_index
+           sel_a_b(g_statistics_type="XST", c_sdp_xst_udp_src_port_15_8 & c_gn_index,    -- XST = 0xD1 & gn_index
+                                            c_sdp_sst_udp_src_port_15_8 & c_gn_index));  -- SST = 0xD2 & gn_index
+  END func_sdp_get_stat_udp_src_port;
+
   FUNCTION func_sdp_get_stat_nof_packets(g_statistics_type : STRING; S_pn, P_sq, N_crosslets : NATURAL) RETURN NATURAL IS
   BEGIN
     RETURN sel_a_b(g_statistics_type="BST", 1,