]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
UDP Buffersize changed to 64K
authorhadaq <hadaq>
Tue, 17 Jul 2012 18:25:07 +0000 (18:25 +0000)
committerhadaq <hadaq>
Tue, 17 Jul 2012 18:25:07 +0000 (18:25 +0000)
libtrbnet/trbnet.c

index a7a13d8d53f94466ebd93deabaa200778304924e..d6a8520d0ea33c95bc805a35d651128b40aaad81 100644 (file)
@@ -1,4 +1,4 @@
-const char trbnet_version[] = "$Revision: 4.25 $  Local";
+const char trbnet_version[] = "$Revision: 4.26 $  Local";
 
 #include <stdlib.h>
 #include <signal.h>
@@ -37,7 +37,7 @@ int pexor_dma = 1;
 #include <netinet/in.h>
 #include <netdb.h>
 
-static uint16_t udpBuffer[750]; /* Maxminum is payload of one Ethernet-Frame */
+static uint16_t udpBuffer[32768]; /* One UDP Package */
 static uint16_t dataBuffer[4096 * 1024];
 static unsigned int dataBufferSize = 0;  /* Size of dataBuffer in 16BIt words */
 static int trb3_sockfd = -1;
@@ -378,7 +378,8 @@ static int getUDPPackage()
   int i;
   
   /* GetData */
-  status = recv(trb3_sockfd_in, (void*)dataBuffer, 1500, 0);
+  fprintf(stderr, "Wait UDP Data\n");
+  status = recv(trb3_sockfd_in, (void*)dataBuffer, 65536, 0);
   if (status == -1) {
     trb_errno = errno == EAGAIN 
       ? TRB_TRB3_SOCKET_TIMEOUT 
@@ -386,6 +387,7 @@ static int getUDPPackage()
     return -1;
   }
   dataBufferSize = status / 2;
+  fprintf(stderr, "udp received: %d\n", status);
   
   /* Adjust endianess ... */
   if (trb_debug > 2) {