[ns] source address in application
Wed, 21 Feb 2001 15:29:50 -0800
The receiving application in my model needs access to the source IP
address and port (it is modeling the UDP based recvfrom() interface).
The UDP agent code I'm using calls the application model in the
following manner in its recv method:
if (app_ == 0)
Any suggestions how to surface the information (struct sockadddr) that
is normally returned to the application layer by the recvfrom() socket
I'm currently considering creating a derived class of Application that
defines process_data() with an additional Packet * argument. This
will allow the application to use the hdr_ip::access method to get the
transport reported source address and port. Instances of this
Application class would *need* to be connected to modified Agent
classes that provided the extra argument in the call.
Is there a better way?
Many thanks in advance ...