X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fpinsched.c;h=6af2bb6765e2edcc18f46284f32fdfea3b01b17c;hb=25eeae6a1e12445c6d17b27d092f5936a6150892;hp=a4f5bfad5d047380811c2946119358476071dbdb;hpb=58fda1dab104041fc693032475ec4662c1a52849;p=openvswitch diff --git a/ofproto/pinsched.c b/ofproto/pinsched.c index a4f5bfad..6af2bb67 100644 --- a/ofproto/pinsched.c +++ b/ofproto/pinsched.c @@ -1,5 +1,5 @@ /* - * 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. @@ -16,7 +16,10 @@ #include #include "pinsched.h" +#include +#include #include +#include #include #include "ofpbuf.h" #include "openflow/openflow.h" @@ -264,6 +267,14 @@ pinsched_destroy(struct pinsched *ps) } } +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) {