diff -ruN iproute-orig/include/linux/pkt_sched.h iproute/include/linux/pkt_sched.h
--- iproute-orig/include/linux/pkt_sched.h	2006-09-14 11:38:10.000000000 -0700
+++ iproute/include/linux/pkt_sched.h	2006-07-16 17:03:21.000000000 -0700
@@ -179,6 +179,35 @@
 	__u32           marked;         /* Marked packets */
 };
 
+
+/* 
+ * MAXNET section
+ * Ryan Witt <witt@caltech.edu>
+ */
+
+enum
+{
+	TCA_MAXNET_UNSPEC,
+	TCA_MAXNET_PARMS,
+	    __TCA_MAXNET_MAX,
+};
+#define TCA_MAXNET_MAX (__TCA_MAXNET_MAX - 1)
+
+struct tc_maxnet_qopt
+{
+	__u32	limit;        /* HARD maximal queue length (bytes) */
+	__u32	c;           
+	__u32	u;
+	__u32   g;   
+	__u32   beta;	
+	__u32	update_dt;
+	__u32	id;
+	__u32	fix_p;
+	__u32	p_min;
+	__u32	msg_dt;
+	__u32	queue_term_delta;
+};
+
 /* GRED section */
 
 #define MAX_DPs 16
diff -ruN iproute-orig/tc/Makefile iproute/tc/Makefile
--- iproute-orig/tc/Makefile	2006-09-14 11:39:18.000000000 -0700
+++ iproute/tc/Makefile	2005-09-18 16:52:05.000000000 -0700
@@ -7,6 +7,7 @@
 TCMODULES += q_fifo.o
 TCMODULES += q_sfq.o
 TCMODULES += q_red.o
+TCMODULES += q_maxnet.o
 TCMODULES += q_prio.o
 TCMODULES += q_tbf.o
 TCMODULES += q_cbq.o
diff -ruN iproute-orig/tc/q_maxnet.c iproute/tc/q_maxnet.c
--- iproute-orig/tc/q_maxnet.c	1969-12-31 16:00:00.000000000 -0800
+++ iproute/tc/q_maxnet.c	2006-07-16 18:30:58.000000000 -0700
@@ -0,0 +1,195 @@
+/*
+ * q_maxnet.c     MaxNet queuing discipline.
+ *
+ *                This program is free software; you can redistribute it and/or
+ *                modify it under the terms of the GNU General Public License
+ *                as published by the Free Software Foundation; either version
+ *                2 of the License, or (at your option) any later version.
+ *
+ * Authors:       Ryan Witt, <witt@caltech.edu>
+ *                Martin Suchara, <suchara@caltech.edu>
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <syslog.h>
+#include <fcntl.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <string.h>
+
+#include "utils.h"
+#include "tc_util.h"
+
+static void explain(void)
+{
+        fprintf(stderr, "Usage: ... maxnet [ limit (bytes) ] [ capacity (bytes/sec) ] [ util (1-1024) ] [ gamma (~=capacity) ] [ beta ] [ dt(usec) ] [ fix_p ] [ p_min ] [ queue_term_delta ]\n");
+}
+
+#define usage() return(-1)
+
+static int maxnet_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n)
+{
+        int ok=0;
+        struct tc_maxnet_qopt opt;
+        struct rtattr *tail;
+        //__u8 sbuf[256];
+        printf("** maxnet_parse_opt **\n");
+
+        memset(&opt, 0, sizeof(opt));
+
+        while (argc > 0) {
+                if (strcmp(*argv, "limit") == 0) {
+                        NEXT_ARG();
+                        if (get_size(&opt.limit, *argv)) {
+                                fprintf(stderr, "Illegal \"limit\"\n");
+                                return -1;
+                        }
+                        ok++;
+		} else if (strcmp(*argv, "capacity") == 0) {
+                        NEXT_ARG();
+                        if (get_size(&opt.c, *argv)) {
+                                fprintf(stderr, "Illegal \"capacity\"\n");
+                                return -1;
+                        }
+                        ok++;
+		} else if (strcmp(*argv, "util") == 0) {
+                        NEXT_ARG();
+                        if (get_size(&opt.u, *argv)) {
+                                fprintf(stderr, "Illegal \"util\"\n");
+                                return -1;
+                        }
+                        ok++;
+		} else if (strcmp(*argv, "gamma") == 0) {
+                        NEXT_ARG();
+                        if (get_size(&opt.g, *argv)) {
+                                fprintf(stderr, "Illegal \"gamma\"\n");
+                                return -1;
+                        }
+                        ok++;
+		} else if (strcmp(*argv, "beta") == 0) {
+                        NEXT_ARG();
+                        if (get_size(&opt.beta, *argv)) {
+                                fprintf(stderr, "Illegal \"beta\"\n");
+                                return -1;
+                        }
+                        ok++;
+		} else if (strcmp(*argv, "dt") == 0) {
+                        NEXT_ARG();
+                        if (get_size(&opt.update_dt, *argv)) {
+                                fprintf(stderr, "Illegal \"dt\"\n");
+                                return -1;
+                        }
+                        ok++;
+		} else if (strcmp(*argv, "id") == 0) {
+                        NEXT_ARG();
+                        if (get_size(&opt.id, *argv)) {
+                                fprintf(stderr, "Illegal \"id\"\n");
+                                return -1;
+                        }
+                        ok++;
+		} else if (strcmp(*argv, "fix_p") == 0) {
+                        NEXT_ARG();
+                        if (get_size(&opt.fix_p, *argv)) {
+                                fprintf(stderr, "Illegal \"fix_p\"\n");
+                                return -1;
+                        }
+                        ok++;
+		} else if (strcmp(*argv, "p_min") == 0) {
+                        NEXT_ARG();
+                        if (get_size(&opt.p_min, *argv)) {
+                                fprintf(stderr, "Illegal \"p_min\"\n");
+                                return -1;
+                        }
+                        ok++;
+		} else if (strcmp(*argv, "queue_term_delta") == 0) {
+                        NEXT_ARG();
+printf("queue term delta %s\n",*argv);			
+                        if (get_size(&opt.queue_term_delta, *argv)) {
+				
+                                fprintf(stderr, "Illegal \"queue_term_delta\"\n");
+                                return -1;
+                        }
+                        ok++;
+		} else if (strcmp(*argv, "msg_dt") == 0) {
+			NEXT_ARG();
+printf("msg_dt %s\n",*argv);
+			if (get_size(&opt.msg_dt, *argv)) {
+				fprintf(stderr, "Illegal \"msg_dt\"\n");
+				return -1;
+			}
+			ok++;
+                } else if (strcmp(*argv, "help") == 0) {
+                        explain();
+                        return -1;
+                } else {
+                        fprintf(stderr, "What is \"%s\"?\n", *argv);
+                        explain();
+                        return -1;
+                }
+                argc--; argv++;
+        }
+
+        if (!ok) {
+                explain();
+                return -1;
+        }
+
+	
+        printf("Absolut Citron\n");
+        tail = (struct rtattr*)(((void*)n)+NLMSG_ALIGN(n->nlmsg_len));
+        addattr_l(n, 1024, TCA_OPTIONS, NULL, 0);
+        addattr_l(n, 1024, TCA_MAXNET_PARMS, &opt, sizeof(struct tc_maxnet_qopt));
+        tail->rta_len = (((void*)n)+NLMSG_ALIGN(n->nlmsg_len)) - (void*)tail;
+        return 0;
+}
+
+static int maxnet_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
+{
+        struct tc_maxnet_qopt *qopt;
+        struct rtattr *tb[TCA_MAXNET_PARMS+1];
+
+        if (opt == NULL)
+                return 0;
+        
+        memset(tb, 0, sizeof(tb));
+        parse_rtattr(tb, TCA_MAXNET_PARMS, RTA_DATA(opt), RTA_PAYLOAD(opt));
+
+        /* Get the qopt structure out of the message. */
+        if (tb[TCA_MAXNET_PARMS] == NULL)
+                return -1;
+        qopt = RTA_DATA(tb[TCA_MAXNET_PARMS]);
+        if (RTA_PAYLOAD(tb[TCA_MAXNET_PARMS]) < sizeof(*qopt))
+                return -1;
+
+        /* Now print out the qopt info. */
+        fprintf(f, "limit %u  c %u  u %u g %u dt %d beta %d queue_term_delta %d msg_dt %u p_min %u\n", qopt->limit,
+                                                         qopt->c,
+                                                         qopt->u,
+							 qopt->g,
+                                                         qopt->update_dt,
+							 qopt->beta,
+							 qopt->queue_term_delta,qopt->msg_dt,qopt->p_min);
+        
+        return 0;
+}
+
+
+
+static int maxnet_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats)
+{
+        printf("** maxnet_print_xstats **\n");
+        return 0;
+}
+
+
+struct qdisc_util maxnet_qdisc_util = {
+      .id            = "maxnet",
+      .parse_qopt    =  maxnet_parse_opt,
+      .print_qopt    =  maxnet_print_opt,
+      .print_xstats  =  maxnet_print_xstats,
+};
+

