title: netstat does not show listening port of udp server?
body: <p>I have the following udp server:</p>
  
  <pre><code>/************* UDP SERVER CODE *******************/
  
  #include &lt;stdio.h&gt;
  #include &lt;sys/socket.h&gt;
  #include &lt;netinet/in.h&gt;
  #include &lt;string.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main(){
    int udpSocket, nBytes;
    char buffer[1024];
    struct sockaddr_in serverAddr, clientAddr;
    struct sockaddr_storage serverStorage;
    socklen_t addr_size, client_addr_size;
    int i;
  
    /*Create UDP socket*/
    udpSocket = socket(PF_INET, SOCK_DGRAM, 0);
  
    /*Configure settings in address struct*/
    serverAddr.sin_family = AF_INET;
    serverAddr.sin_port = htons(20001);
    serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1");
    memset(serverAddr.sin_zero, '\0', sizeof serverAddr.sin_zero);  
  
    /*Bind socket with address struct*/
    bind(udpSocket, (struct sockaddr *) &amp;serverAddr, sizeof(serverAddr));
  
    /*Initialize size variable to be used later on*/
    addr_size = sizeof serverStorage;
  
    while(1){
      /* Try to receive any incoming UDP datagram. Address and port of 
        requesting client will be stored on serverStorage variable */
      nBytes = recvfrom(udpSocket,buffer,1024,0,(struct sockaddr *)&amp;serverStorage, &amp;addr_size);
  
      /*Convert message received to uppercase*/
      for(i=0;i&lt;nBytes-1;i++)
        buffer[i] = toupper(buffer[i]);
  
      /*Send uppercase message back to client, using serverStorage as the address*/
      sendto(udpSocket,buffer,nBytes,0,(struct sockaddr *)&amp;serverStorage,addr_size);
    }
  
    return 0;
  }
  </code></pre>
  
  <p>I compiled and launched the udp server on my linux. and then I tried to see the listening UDP port with hetstat command but I did not see my server port listening:</p>
  
  <pre><code>sudo netstat -nulp | grep LISTEN
  </code></pre>
  
  <p>What I m missing?</p>