Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

click to hide/show revision 1
initial version

Get packet data from packetIn

Hi,

I am sending UDP packets from mininet hosts with some data/payload. How to parse the packetIn in the controller to get the packet data ? I am only able to parse the packet to get UDP headers but not the actual data.

Below is the program that sends UDP packets from mininet hosts

# addressing information of target
IPADDR = '8.4.2.1'
PORTNUM = 10000

# enter the data content of the UDP packet as hex
PACKETDATA = 'packet data'

# initialize a socket, think of it as a cable
# SOCK_DGRAM specifies that this is UDP
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)

# connect the socket, think of it as connecting the cable to the address location
s.connect((IPADDR, PORTNUM))

# send the command
s.send(PACKETDATA)

# close the socket

Thanks

Get Unable to get packet data from packetIn

 Hi,

 I am sending UDP packets from mininet hosts with some data/payload. How to parse the packetIn in the controller to get the packet data ? I am only able to parse the packet to get UDP headers but not the actual data.

 Below is the program that sends UDP packets from mininet hosts

 # addressing information of target
 IPADDR = '8.4.2.1'
 PORTNUM = 10000

 # enter the data content of the UDP packet as hex
 PACKETDATA = 'packet data'

 # initialize a socket, think of it as a cable
 # SOCK_DGRAM specifies that this is UDP
 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)

 # connect the socket, think of it as connecting the cable to the address location
 s.connect((IPADDR, PORTNUM))

 # send the command
 s.send(PACKETDATA)

 # close the socket

 Thanks