How to enclose meaningful data into UDP packet in INET?

486 views
Skip to first unread message

Winters Wen

unread,
Jul 30, 2014, 8:44:12 AM7/30/14
to omn...@googlegroups.com
Hi there.

I want add some meaningful data into UDP packet, then send it out via wireless, if there some available samples?

Regards,
Tao


Ivo Calado

unread,
Jul 30, 2014, 8:59:23 AM7/30/14
to omn...@googlegroups.com
Hi Winters,
    take a look on the UDPBasicBurst that shows how to send packets through a UDPSocket. In such application, it is considered the use of cPackets. Nevertheless, you can create customized messages by extending from cPackets.


--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Ivo Calado

Quidquid latine dictum sit, altum viditur

Putt's Law:
       Technology is dominated by two types of people:
               Those who understand what they do not manage.
               Those who manage what they do not understand.

Winters Wen

unread,
Jul 30, 2014, 9:19:37 AM7/30/14
to omn...@googlegroups.com
Hi Ivo

Thanks for your reply.ao

By extending cPackets, Can I bring data from external program (outside of OMNeT++) in UDP packet?

Regards,
Tao


--
You received this message because you are subscribed to a topic in the Google Groups "omnetpp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/omnetpp/SaLsmqFCcDc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to omnetpp+u...@googlegroups.com.

Ivo Calado

unread,
Jul 30, 2014, 9:38:05 AM7/30/14
to omn...@googlegroups.com
Winters,
   by "external program" what are you refering? A pipe, a local file etc or something similar?  On the other hand, if you are talking about send data to external interfaces the INET offers support to.

[]'s

Winters Wen

unread,
Jul 30, 2014, 9:46:49 AM7/30/14
to omnetpp
Hi Ivo

The 'external program' means a third party software, this software  sends out strings periodically.

I want enclosed these strings into UDP packets in OMNeT++. Is this possible?

Thank you very much.

Regards,
Winters

Ivo Calado

unread,
Jul 30, 2014, 9:53:49 AM7/30/14
to omn...@googlegroups.com
Hi Winters,
    but 'how' it sends? Through a sockets? If so, take a look in the support to external interface on INET. If you are talking about a local program you can create a pipe in order to send data from the application to INET.

To enclose data into UDP packets you must create a packet that extends from cPacket. In such customized packet you may use a ByteArray object to enclose real bytes.

[]'s

Winters Wen

unread,
Jul 30, 2014, 9:58:14 AM7/30/14
to omn...@googlegroups.com
Hi Ivo

Thank you very much!!!!

Regards,
Winters

Winters Wen

unread,
Aug 11, 2014, 4:15:50 PM8/11/14
to omnetpp
Hi Ivo,

So sorry to ask you question again.

I looked the support to external interface on INET, and want to run a external client example (examples\emulation\extclient). But I cannot understand the README file of this example totally.

"On your server, add a route to the host 10.1.1.1 and set the gateway to the IP address of the computer, on which the simulation is running."

What is the sever mena? How to add the route to the host?  Can you give me some instruction on how to run this example?

Appreciate very much!
Tao

Ivo Calado

unread,
Aug 13, 2014, 8:36:19 PM8/13/14
to omn...@googlegroups.com
Hi Winters, sorry for the long delay.

I have never make transmissions through external interface. Nevertheless, by reading that README it indicates that in such example the ExtClient will communicate with an external server. In order to allow the communication from the server to the ExtClient you must add a route (using route command) to the host 10.1.1.1 through the simulation host computer (setting this as the gateway of this route).

- On your server, add a route to the host 10.1.1.1 and set the gateway to the IP address of the computer, on which the simulation is running.

I hope I have helped you.

Best regards,
   Ivo

Celia Yasmine TAZIBT

unread,
Jun 1, 2018, 4:36:44 AM6/1/18
to OMNeT++ Users
Hi all,
I'm new in inet , i want too to add some information du the udp packet and send it via wireless . what you advice me to use to do this.
thank you

baukran

unread,
Jun 1, 2018, 4:56:59 AM6/1/18
to OMNeT++ Users

Celia Yasmine TAZIBT

unread,
Jun 1, 2018, 5:09:53 AM6/1/18
to omn...@googlegroups.com
thank you i'll try to see this part.

--
You received this message because you are subscribed to a topic in the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and all its topics, send an email to omnetpp+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/omnetpp.

Omaima Younsi

unread,
Nov 17, 2022, 8:12:02 AM11/17/22
to OMNeT++ Users
Hello, 

I would like to know if you found a solution for this, I will be thankful .

Reply all
Reply to author
Forward
0 new messages