X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fvconn.c;h=5cd708d246d250eaa29715512a565f1961354583;hb=d58c5bc2d854ce601338d0785c8086d619a16135;hp=f0be46a3da9cccd27241dd2f5abe0de9ef1cd837;hpb=87ea5e5e26c97598cd66ef64c8386afac2b77fff;p=openvswitch diff --git a/lib/vconn.c b/lib/vconn.c index f0be46a3..5cd708d2 100644 --- a/lib/vconn.c +++ b/lib/vconn.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira Networks. + * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,6 +38,7 @@ #include "random.h" #include "util.h" #include "vlog.h" +#include "socket-util.h" VLOG_DEFINE_THIS_MODULE(vconn); @@ -219,7 +220,8 @@ vconn_verify_name(const char *name) * stores a pointer to the new connection in '*vconnp', otherwise a null * pointer. */ int -vconn_open(const char *name, int min_version, struct vconn **vconnp) +vconn_open(const char *name, int min_version, struct vconn **vconnp, + uint8_t dscp) { struct vconn_class *class; struct vconn *vconn; @@ -237,7 +239,7 @@ vconn_open(const char *name, int min_version, struct vconn **vconnp) /* Call class's "open" function. */ suffix_copy = xstrdup(strchr(name, ':') + 1); - error = class->open(name, suffix_copy, &vconn); + error = class->open(name, suffix_copy, &vconn, dscp); free(suffix_copy); if (error) { goto error; @@ -282,7 +284,7 @@ vconn_open_block(const char *name, int min_version, struct vconn **vconnp) fatal_signal_run(); - error = vconn_open(name, min_version, &vconn); + error = vconn_open(name, min_version, &vconn, DSCP_DEFAULT); if (!error) { while ((error = vconn_connect(vconn)) == EAGAIN) { vconn_run(vconn); @@ -899,7 +901,7 @@ pvconn_verify_name(const char *name) * stores a pointer to the new connection in '*pvconnp', otherwise a null * pointer. */ int -pvconn_open(const char *name, struct pvconn **pvconnp) +pvconn_open(const char *name, struct pvconn **pvconnp, uint8_t dscp) { struct pvconn_class *class; struct pvconn *pvconn; @@ -916,7 +918,7 @@ pvconn_open(const char *name, struct pvconn **pvconnp) /* Call class's "open" function. */ suffix_copy = xstrdup(strchr(name, ':') + 1); - error = class->listen(name, suffix_copy, &pvconn); + error = class->listen(name, suffix_copy, &pvconn, dscp); free(suffix_copy); if (error) { goto error;