/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <config.h>
#include "pinsched.h"
+#include <sys/types.h>
+#include <netinet/in.h>
#include <arpa/inet.h>
+#include <stdint.h>
#include <stdlib.h>
#include "ofpbuf.h"
#include "openflow/openflow.h"
struct ofpbuf *packet = queue_pop_head(q);
if (!q->n) {
free(q);
- port_array_set(&ps->queues, port_no, NULL);
+ port_array_delete(&ps->queues, port_no);
}
ps->n_queued--;
return packet;
}
}
+void
+pinsched_get_limits(const struct pinsched *ps,
+ int *rate_limit, int *burst_limit)
+{
+ *rate_limit = ps->rate_limit;
+ *burst_limit = ps->burst_limit;
+}
+
void
pinsched_set_limits(struct pinsched *ps, int rate_limit, int burst_limit)
{