Main Page | Class List | File List | Class Members | File Members

scheduler.h

Go to the documentation of this file.
00001 /* Packet transmission scheduler.
00002  *
00003  */
00004 
00005 #ifndef _SCHEDULER_H
00006 #define _SCHEDULER_H
00007 
00008 #define TCP_MAX_QUEUES     (2*TCP_MAX_CONN)
00009 #define TCP_PACKET_TIMEOUT 5000  /* Timeout in miliseconds. */
00010 #define DRR_QUANTUM        365   /* 1460/4, so high priority queues
00011                                     can send straight away. */
00012 
00013 /* Queue sizes in packets. */
00014 enum {
00015     QUEUE_SIZE_HI_PRI  = 256,
00016     QUEUE_SIZE_TCP     = 50,
00017     QUEUE_SIZE_LOW_PRI = 1024
00018 }; 
00019 
00020 /* Queue weights for different priorities. */
00021 enum {
00022     QUEUE_WEIGHT_HIGH   = 6,
00023     QUEUE_WEIGHT_NORMAL = 2,
00024     QUEUE_WEIGHT_LOW    = 1
00025 };
00026 
00027 void init_sched();
00028 int alloc_tcp_queue(unsigned weight);
00029 int close_tcp_queue(int queue_num);
00030 int reset_tcp_queue(int queue_num);
00031 void cleanup_sched();
00032 void mh_ack_rcvd(unsigned ack_seq, int queue_num);
00033 int queue_tcp(Tpacket_data *pd, int queue_num);
00034 int queue_hipri(Tpacket_data *pd);
00035 int queue_lowpri(Tpacket_data *pd);
00036 void scheduler (void *ptr);
00037 
00038 #endif /* _SCHEDULER_H */

Generated on Sun May 14 13:36:52 2006 by  doxygen 1.4.2