Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 Discussions

UDP Offload not receiving

Altera_Forum
Honored Contributor II
1,391 Views

Hi I am using the UDP Offload example. the only difference is that instead of the packet checker i have a custom component that just outputs the avalon ST signal for my hardware to use. Here is the code i used to initialize the socket:  

/* Create socket for sending/receiving datagrams */ if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) printf("socket() failed"); /* Construct local address structure */ memset(&my_Addr, 0, sizeof(my_Addr)); /* Zero out structure */ my_Addr.sin_family = AF_INET; /* Internet address family */ my_Addr.sin_addr.s_addr = htons(INADDR_ANY); /* Any incoming interface */ my_Addr.sin_port = htons(PORT_0); /* Local port */ /* Bind to the local address */ if (bind(sock, (struct sockaddr *) &my_Addr, sizeof(my_Addr)) < 0) printf("bind() failed"); if (clear_udp_payload_extractor_counter (EXTRACTOR_0_BASE)) printf("Clear extractor failed\n"); result = map_udp_port_to_channel((void*)(UDP_MAPPER_BASE), 0, PORT_0); if (result) printf("Port Mapping Failed: %d\n", result); for (;;) /* Run forever */ { // Hang out usleep(10000); }  

 

Then i use a UDP sender that i know works to send udp packets to the board from my PC. But if i use a packet sniffer nothing actually gets to the board. it just looks like it is not listening at that IP or port.  

 

Now i am not sure if i need to initialize anything else for the hardware to work like its suppose to. Or Do i absolutely need the packet checker.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
667 Views

What packet sniffer? If it's on the PC and not seeing anything, that implies the problem is with your transmitter (PC software), and not with your FPGA.

0 Kudos
Altera_Forum
Honored Contributor II
667 Views

I figuered out that something was not being initialized properly and that IP core was not listening at the right IP address thanks for the help anyways.

0 Kudos
Reply