~ubuntu-branches/ubuntu/wily/openvswitch/wily

« back to all changes in this revision

Viewing changes to lib/vconn-provider.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-08-10 11:35:15 UTC
  • mfrom: (1.1.30)
  • Revision ID: package-import@ubuntu.com-20150810113515-575vj06oq29emxsn
Tags: 2.4.0~git20150810.97bab95-0ubuntu1
* New upstream snapshot from 2.4 branch:
  - d/*: Align any relevant packaging changes with upstream.
* d/*: wrap-and-sort.
* d/openvswitch-{common,vswitch}.install: Correct install location for
  bash completion files.
* d/tests/openflow.py: Explicitly use ovs-testcontroller as provided
  by 2.4.0 release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 2008, 2009, 2010, 2012, 2013 Nicira, Inc.
 
2
 * Copyright (c) 2008, 2009, 2010, 2012, 2013, 2015 Nicira, Inc.
3
3
 *
4
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
5
 * you may not use this file except in compliance with the License.
20
20
/* Provider interface to vconns, which provide a virtual connection to an
21
21
 * OpenFlow device. */
22
22
 
23
 
#include "vconn.h"
 
23
#include "openvswitch/vconn.h"
24
24
#include "util.h"
25
25
#include "openflow/openflow-common.h"
26
26
 
27
27
/* Active virtual connection to an OpenFlow device. */
28
28
 
29
 
/* Active virtual connection to an OpenFlow device.
30
 
 *
31
 
 * This structure should be treated as opaque by vconn implementations. */
 
29
/* This structure should be treated as opaque by vconn implementations. */
32
30
struct vconn {
33
 
    const struct vconn_class *class;
 
31
    const struct vconn_class *vclass;
34
32
    int state;
35
33
    int error;
36
34
 
47
45
                const char *name, uint32_t allowed_versions);
48
46
void vconn_free_data(struct vconn *vconn);
49
47
static inline void vconn_assert_class(const struct vconn *vconn,
50
 
                                      const struct vconn_class *class)
 
48
                                      const struct vconn_class *vclass)
51
49
{
52
 
    ovs_assert(vconn->class == class);
 
50
    ovs_assert(vconn->vclass == vclass);
53
51
}
54
52
 
55
53
struct vconn_class {
130
128
    void (*wait)(struct vconn *vconn, enum vconn_wait_type type);
131
129
};
132
130
 
133
 
/* Passive virtual connection to an OpenFlow device.
134
 
 *
135
 
 * This structure should be treated as opaque by vconn implementations. */
 
131
/* Passive virtual connection to an OpenFlow device. */
 
132
 
 
133
/* This structure should be treated as opaque by vconn implementations. */
136
134
struct pvconn {
137
 
    const struct pvconn_class *class;
 
135
    const struct pvconn_class *pvclass;
138
136
    char *name;
139
137
    uint32_t allowed_versions;
140
138
};
141
 
 
142
 
void pvconn_init(struct pvconn *pvconn, const struct pvconn_class *class,
 
139
void pvconn_init(struct pvconn *pvconn, const struct pvconn_class *pvclass,
143
140
                 const char *name, uint32_t allowed_versions);
144
141
static inline void pvconn_assert_class(const struct pvconn *pvconn,
145
 
                                       const struct pvconn_class *class)
 
142
                                       const struct pvconn_class *pvclass)
146
143
{
147
 
    ovs_assert(pvconn->class == class);
 
144
    ovs_assert(pvconn->pvclass == pvclass);
148
145
}
149
146
 
150
147
struct pvconn_class {