title: Send UDP on specific connection in µIP
body: <p>I'm using uIP on a Tiva C Launchpad board and want to send UDP Packages. But it seems that the uip_buf is not filled when i call the uip_udp_periodic function.</p>
  
  <p>The code looks like this:</p>
  
  <pre><code>uint8_t my_udp_buf = {0x00, 0xAA, 0xBB, 0xCC};
  uint32_t my_udp_buf_len = 4;
  
  void main(main){
  [...]
      uip_ipaddr_t addr;
      struct uip_udp_conn *c;
  
      uip_ipaddr(&amp;addr, 172,16,23,1);
      c = uip_udp_new(&amp;addr, HTONS(12345)); // setting up a new UDP connection to 172.16.23.1:12345 here
  
      [...]
      while(42==42){
          uip_udp_conn = c; // set the current connection to our udp connection
          uip_appdata = my_udp_buf; // asssign the uip_appdata pointer to our data pointer
          uip_send(uip_appdata, my_udp_buf_len); // sending the data
  
  
          [...]
          // call the periodic function for all UDP connections
          for(ui32Temp = 0; ui32Temp &lt; UIP_UDP_CONNS; ui32Temp++)
          {
              uip_udp_periodic(ui32Temp);
              // --&gt; The uip_len is always 0! why?
  
              //
              // If the above function invocation resulted in data that
              // should be sent out on the network, the global variable
              // uip_len is set to a value &gt; 0.
              //
              if(uip_len &gt; 0)
              {
                  uip_arp_out();
                  PacketTransmit(EMAC0_BASE, uip_buf, uip_len);
                  uip_len = 0;
              }
          }
      }
  }
  </code></pre>
  
  <p>The question is, do i set the connection correctly? In the header file i cannot find any macro or function to control on which connection i send out the data, so i assume that i need to set the connection pointer. Also do i need to save the data? probably the pointer to uip_appdata is overwritten somewhere else afterwards.</p>