#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <time.h>
#include <semaphore.h>
#include <pthread.h>
#include <sys/socket.h>
#include <linux/tcp.h>
#include <linux/ip.h>
#include <linux/in.h>
#include "tcpproxy.h"
#include "misc.h"
#include "tcptimer.h"
#include "tcp.h"
#include "scheduler.h"
Go to the source code of this file.
|
|
|
|
|
Definition at line 23 of file scheduler.c. |
|
Definition at line 198 of file scheduler.c. References add_timer(), get_mclock(), packet_sent::mtime, packet_sent::next, packet_timeout(), packet_sent::prev, packet_sent::q, packet_queue::sent_hd, packet_sent::seq, seq_cmp(), packet_sent::size, TCP_PACKET_TIMEOUT, packet_data::trans, and xmalloc(). Referenced by scheduler(). |
|
Definition at line 239 of file scheduler.c. References DPRINT, mutex_lock(), mutex_unlock(), QUEUE_STATE_FREE, QUEUE_STATE_USED, sched_mut, packet_queue::state, TCP_MAX_QUEUES, and packet_queue::weight. Referenced by alloc_tcp_cb(). |
|
Definition at line 380 of file scheduler.c. References DPRINT, packet_queue::head, packet_queue::in_flight, queue_empty(), QUEUE_STATE_CLOSED, QUEUE_STATE_FREE, packet_queue::state, packet_queue::tail, and TCP_MAX_QUEUES. Referenced by mh_ack_rcvd(), and scheduler(). |
|
Definition at line 400 of file scheduler.c. References clear_tcp_queue(), QUEUE_STATE_FREE, send_sem, sock, packet_queue::state, packet_queue::tab, TCP_MAX_QUEUES, and xfree(). Referenced by main(). |
|
Definition at line 289 of file scheduler.c. References clear_timer(), dealloc_packet_data(), DEBUG, DPRINT, packet_queue::head, packet_queue::in_flight, packet_queue::max, packet_sent::next, packet_timeout(), queue_empty(), queue_size(), queued_pkts, send_sem, packet_queue::sent_hd, packet_sent::size, packet_queue::tab, tcp_in_flight, TCP_MAX_QUEUES, and xfree(). Referenced by cleanup_sched(), and reset_tcp_queue(). |
|
Definition at line 267 of file scheduler.c. References DPRINT, mutex_lock(), mutex_unlock(), QUEUE_STATE_CLOSED, QUEUE_STATE_USED, sched_mut, packet_queue::state, and TCP_MAX_QUEUES. Referenced by dealloc_tcp_cb(). |
|
Definition at line 496 of file scheduler.c. References packet_queue::head, packet_queue::max, queue_empty(), queued_pkts, and packet_queue::tab. Referenced by scheduler(). |
|
Definition at line 67 of file scheduler.c. References packet_queue::dc, EPRINT, EXIT_ERR_SEM_INIT, EXIT_ERR_SOCKET, packet_queue::head, packet_queue::in_flight, packet_queue::max, QUEUE_SIZE_HI_PRI, QUEUE_SIZE_LOW_PRI, QUEUE_SIZE_TCP, QUEUE_STATE_FREE, QUEUE_STATE_USED, QUEUE_WEIGHT_NORMAL, queued_pkts, safe_exit(), sched_mut, send_sem, packet_queue::sent_hd, sock, packet_queue::state, packet_queue::tab, packet_queue::tail, tcp_in_flight, TCP_MAX_QUEUES, packet_queue::weight, and xmalloc(). Referenced by main(). |
|
Definition at line 515 of file scheduler.c. References check_dealloc_tcp_queue(), clear_timer(), DPRINT, packet_queue::in_flight, mutex_lock(), mutex_unlock(), packet_sent::next, packet_timeout(), packet_sent::prev, sched_mut, send_sem, packet_queue::sent_hd, packet_sent::seq, seq_cmp(), packet_sent::size, tcp_in_flight, and xfree(). Referenced by handle_tcp(). |
|
Definition at line 167 of file scheduler.c. References DPRINT, packet_queue::in_flight, mutex_lock(), mutex_unlock(), packet_sent::next, packet_sent::prev, packet_sent::q, sched_mut, packet_queue::sent_hd, packet_sent::seq, packet_sent::size, tcp_in_flight, and xfree(). Referenced by add_tcp_sent(), clear_tcp_queue(), and mh_ack_rcvd(). |
|
Definition at line 156 of file scheduler.c. References packet_queue::head, and packet_queue::tail. Referenced by check_dealloc_tcp_queue(), clear_tcp_queue(), dequeue_packet(), and scheduler(). |
|
Definition at line 582 of file scheduler.c. References packet_data::dir, DPRINT, PACKET_DIR_IN, PACKET_DIR_OUT, queue_packet(), send_packet(), and UNREACHABLE. Referenced by handle_icmp(), handle_tcp(), and send_tcp_rst(). |
|
Definition at line 599 of file scheduler.c. References packet_data::dir, DPRINT, PACKET_DIR_IN, PACKET_DIR_OUT, queue_packet(), send_packet(), and UNREACHABLE. Referenced by handle_other(). |
|
Definition at line 455 of file scheduler.c. References dealloc_packet_data(), DEBUG, DPRINT, packet_queue::max, mutex_lock(), mutex_unlock(), queue_size(), queued_pkts, sched_mut, send_sem, packet_queue::tab, packet_queue::tail, and TCP_MAX_QUEUES. Referenced by queue_hipri(), queue_lowpri(), and queue_tcp(). |
|
Definition at line 145 of file scheduler.c. References packet_queue::head, packet_queue::max, and packet_queue::tail. Referenced by clear_tcp_queue(), queue_packet(), and scheduler(). |
|
Definition at line 555 of file scheduler.c. References packet_data::dir, DPRINT, PACKET_DIR_IN, PACKET_DIR_OUT, queue_packet(), send_packet(), TCP_MAX_QUEUES, packet_data::trans, and UNREACHABLE. Referenced by handle_tcp(). |
|
Definition at line 357 of file scheduler.c. References clear_tcp_queue(), mutex_lock(), mutex_unlock(), QUEUE_STATE_USED, sched_mut, and TCP_MAX_QUEUES. Referenced by handle_tcp(). |
|
Definition at line 620 of file scheduler.c. References add_tcp_sent(), check_dealloc_tcp_queue(), packet_queue::dc, dequeue_packet(), DPRINT, DRR_QUANTUM, EPRINT, packet_queue::head, packet_queue::in_flight, packet_queue::max, max_tcp_in_flight, mutex_lock(), mutex_unlock(), queue_empty(), queue_size(), QUEUE_STATE_FREE, queued_pkts, request_exit, sched_mut, send_packet(), send_sem, packet_queue::state, packet_queue::tab, tcp_data_size(), tcp_in_flight, TCP_MAX_QUEUES, and packet_queue::weight. Referenced by main(). |
|
Definition at line 424 of file scheduler.c. References dealloc_packet_data(), DPRINT, EPRINT, packet_data::ip, packet_data::ipq_pm, packet_data::payload, and sock. Referenced by queue_hipri(), queue_lowpri(), queue_tcp(), and scheduler(). |
|
Definition at line 55 of file scheduler.c. |
|
Definition at line 56 of file scheduler.c. |
|
Definition at line 61 of file scheduler.c. Referenced by scheduler(). |
|
Definition at line 59 of file scheduler.c. Referenced by clear_tcp_queue(), dequeue_packet(), init_sched(), queue_packet(), and scheduler(). |
|
Definition at line 57 of file scheduler.c. Referenced by alloc_tcp_queue(), close_tcp_queue(), init_sched(), mh_ack_rcvd(), packet_timeout(), queue_packet(), reset_tcp_queue(), and scheduler(). |
|
Definition at line 58 of file scheduler.c. Referenced by cleanup_sched(), clear_tcp_queue(), init_sched(), mh_ack_rcvd(), queue_packet(), and scheduler(). |
|
Definition at line 53 of file scheduler.c. Referenced by cleanup_sched(), init_sched(), and send_packet(). |
|
Definition at line 60 of file scheduler.c. Referenced by clear_tcp_queue(), init_sched(), mh_ack_rcvd(), packet_timeout(), and scheduler(). |
|
Definition at line 54 of file scheduler.c. |
|
|