[srslte-users] How can I access the pdu->msg.
Paul Sutton
paul at softwareradiosystems.com
Thu Jun 4 16:51:21 UTC 2020
Hi Raghav,
Instead of trying to print from within the
gtpu::handle_gtpu_s1u_rx_packet function, you can simply view the
message in hex format in the log file.
On line 225 of
https://github.com/srsLTE/srsLTE/blob/master/srsenb/src/stack/upper/gtpu.cc,
you will see that all GTPU data PDUs are logged with level INFO. You
simply need to configure srsENB logging for the GTPU layer to use log
level INFO (gtpu_level = info) and enable hex output (gtpu_hex_limit = 32).
Best regards,
Paul
On 04/06/2020 16:47, Raghav Rathi wrote:
> Hello Everyone,
>
> I am trying to understand how srsLTE handles IP packets. I am running
> the ping example mentioned in the srsLTE ZeroMQ documentation and I am
> focusing on the ENB part.
> From my understanding, when I call ping command, the flow of control
> goes to the 'gtpu.cc' file which makes sense as gtp is the GPRS
> tunneling protocol - U which carries user data from EPC to ENB.
> After looking at the gtpu.cc, i found that there is a function named
> 'handle_gtpu_s1u_rx_packet' and every time i call ping, this function
> is called which i verified by adding a print statement.
>
> My aim here is to understand the IP packet which from my observation
> is the 'pdu' present in 'handle_gtpu_s1u_rx_packet' function.
> pdu->N_bytes shows the byte size of the msg, but when I access the msg
> using pdu->msg, it gives me random characters.
> Since msg is a buffer I simply used a for loop of range pdu->n_byte
> and tried to access msg[i] but i am getting the following output. I
> think it is because the packet is encoded but I don't know how to
> decode. Can someone please help me with that?
>
> >>>> pdu -> n_byte84
> >>>>>>>>>> PDU->msg: E T � � @ @ � � � � % N
> � ^ � �
>
! " # $ % & ' ( ) *
> + , - . / 0 1 2 3 4 5 6 7
>
>
> Thank you,
>
> *Raghav Rathi*
>
> _______________________________________________
> srslte-users mailing list
> srslte-users at lists.softwareradiosystems.com
> http://www.softwareradiosystems.com/mailman/listinfo/srslte-users
--
________________________________________________________________
Paul Sutton Ph.D.
Software Radio Systems (SRS)
http://www.softwareradiosystems.com
paul at softwareradiosystems.com
PGP Key ID: 3B4A5292
Fingerprint: B0AC 19C9 B228 A6EB 86E1 82B2 90C7 EC95 3B4A 5292
________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.srsran.com/pipermail/srsran-users/attachments/20200604/ae1ec0ce/attachment.htm>
More information about the srsran-users
mailing list