tcpdump -A -u port 9877 -i iface
 
  tcpdump -A -u port 9877 -i iface
   −
Modified version of the UDP server linked above, which sends replies:
+
Modified version of the UDP server linked above, which sends replies (and compiles without warnings):
 
<pre>
 
<pre>
 
#include <arpa/inet.h>
 
#include <arpa/inet.h>
 
#include <sys/socket.h>
 
#include <sys/socket.h>
 
#include <unistd.h>
 
#include <unistd.h>
 +
#include <stdlib.h>
 +
#include <string.h>
    
#define BUFLEN 512
 
#define BUFLEN 512
 
#define NPACK 10
 
#define NPACK 10
#define PORT 9930
+
#define PORT 9930
   −
void diep(char *s)
+
void diep(char *s)
{
+
{
  perror(s);
+
perror(s);
  exit(1);
+
exit(1);
}
+
}
   −
int main(void)
  −
{
  −
  struct sockaddr_in si_me, si_other;
  −
  int s, i, slen=sizeof(si_other);
  −
  char buf[BUFLEN];
     Exception encountered, of type "Error"