Changeset 37f3bf5 in network-demos


Ignore:
Timestamp:
Mar 3, 2011, 4:55:12 PM (8 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
e6de8f3
Parents:
9184e70
Message:

2011-03-03 Joel Sherrill <joel.sherrill@…>

  • test.c: Add TCP and UDP Sink Data Host.
Location:
netdemo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • netdemo/ChangeLog

    r9184e70 r37f3bf5  
     12011-03-03      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * test.c: Add TCP and UDP Sink Data Host.
     4
    152009-05-13      Joel Sherrill <joel.sherrill@oarcorp.com>
    26
  • netdemo/test.c

    r9184e70 r37f3bf5  
    3030#define BASE_PORT       24742
    3131
    32 #define DATA_SINK_HOST  ((128 << 24) | (233 << 16) | (14 << 8) | 60)
     32#define UDP_DATA_SINK_HOST      ((10 << 24) | (0 << 16) | (2 << 8) | 255)
     33#define TCP_DATA_SINK_HOST      ((10 << 24) | (0 << 16) | (2 << 8) | 2)
    3334
    3435void showbroad(int s)
     
    8990                rtems_panic ("Can't set socket broadcast: %s", strerror (errno));
    9091showbroad (s);
     92        farAddr.sin_addr.s_addr = htonl (UDP_DATA_SINK_HOST);
    9193        for (i = 0 ; i < 5 ; i++) {
    9294                if (sendto (s, cbuf, sizeof cbuf, 0, (struct sockaddr *)&farAddr, sizeof farAddr) < 0)
     
    9496        }
    9597#endif
    96         farAddr.sin_addr.s_addr = htonl (DATA_SINK_HOST);
     98        farAddr.sin_addr.s_addr = htonl (UDP_DATA_SINK_HOST);
    9799#if 1
    98100        for (i = 0 ; i < 500 ; i++) {
     
    138140        farAddr.sin_family = AF_INET;
    139141        farAddr.sin_port = htons (9);   /* The `discard' port */
    140         farAddr.sin_addr.s_addr = htonl (DATA_SINK_HOST);
     142        farAddr.sin_addr.s_addr = htonl (TCP_DATA_SINK_HOST);
    141143        printf ("Connect socket.\n");
    142144        if (connect (s, (struct sockaddr *)&farAddr, sizeof farAddr) < 0) {
Note: See TracChangeset for help on using the changeset viewer.