Changeset 8218b6b in mainline


Ignore:
Timestamp:
2011-10-26T18:01:22Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7cf7ded
Parents:
2a3214e
Message:

Simulate variable network latency for TCP testing.

Location:
uspace/srv/net/tl/tcp
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tl/tcp/Makefile

    r2a3214e r8218b6b  
    3636        header.c \
    3737        iqueue.c \
     38        ncsim.c \
    3839        rqueue.c \
    3940        segment.c \
  • uspace/srv/net/tl/tcp/conn.c

    r2a3214e r8218b6b  
    4949#include "tqueue.h"
    5050
    51 #define RCV_BUF_SIZE 4096
     51#define RCV_BUF_SIZE 2/*4096*/
    5252#define SND_BUF_SIZE 4096
    5353
  • uspace/srv/net/tl/tcp/rqueue.c

    r2a3214e r8218b6b  
    120120        rc = thread_create(tcp_rqueue_thread, NULL, "rqueue", &tid);
    121121        if (rc != EOK) {
    122                 log_msg(LVL_ERROR, "Failde creating rqueue thread.");
     122                log_msg(LVL_ERROR, "Failed creating rqueue thread.");
    123123                return;
    124124        }
  • uspace/srv/net/tl/tcp/tcp.c

    r2a3214e r8218b6b  
    4141#include <task.h>
    4242
     43#include "ncsim.h"
    4344#include "rqueue.h"
    4445#include "test.h"
     
    6465        tcp_rqueue_thread_start();
    6566
     67        tcp_ncsim_init();
     68        tcp_ncsim_thread_start();
     69
    6670        tcp_test();
    6771
  • uspace/srv/net/tl/tcp/tcp_type.h

    r2a3214e r8218b6b  
    208208} tcp_rqueue_entry_t;
    209209
     210/** NCSim queue entry */
     211typedef struct {
     212        link_t link;
     213        suseconds_t delay;
     214        tcp_sockpair_t sp;
     215        tcp_segment_t *seg;
     216} tcp_squeue_entry_t;
     217
    210218typedef struct {
    211219        link_t link;
  • uspace/srv/net/tl/tcp/tqueue.c

    r2a3214e r8218b6b  
    4343#include "conn.h"
    4444#include "header.h"
     45#include "ncsim.h"
    4546#include "rqueue.h"
    4647#include "segment.h"
     
    219220        tcp_pdu_transmit(data, len);
    220221*/
    221         tcp_rqueue_bounce_seg(sp, seg);
     222        //tcp_rqueue_bounce_seg(sp, seg);
     223        tcp_ncsim_bounce_seg(sp, seg);
    222224}
    223225
Note: See TracChangeset for help on using the changeset viewer.