style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-7505528228218001"
data-ad-slot="1225241371">

Udp Echo Protocol

2 replies [Last post]
gizem.tepe
Offline
Joined: 04/10/2014

hi everybody

My problem is echo protocol.I do not know how to set port 7 on udp .help me please

Mark Bednarczyk
Offline
Joined: 03/22/2008
You question is very vague.

You question is very vague. I'm assuming you created a new packet containing a UDP header and would like to send it.

Use method Udp.destination(int) to change the port number within a packet.

public void sendUdpPacket(Pcap pcap, Packet packet) {
  Udp udp = new Udp();

  if (packet.hasHeader(udp)) {
    udp.destination(7);

    pcap.sendPacket(packet);
  }
}

Sly Technologies, Inc.
http://slytechs.com

gizemtepe
Offline
Joined: 04/10/2014
Udp echo reply

I want to get back udp reply packet after sending udp packet.This is really important to measure one way delay on udp.A host may connect to a server that supports the Echo Protocol using the User Datagram Protocol (UDP) on the well-known port number 7.So I have to set port number 7 on udp and i do not how to set.
I hope that my problem is clearer this time
Thank you for taking the time

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.