diff options
author | Ben Pfaff <blp@nicira.com> | 2013-04-26 13:25:32 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2013-05-03 13:29:49 -0700 |
commit | 5b7126361fd96de4b2609c64b62cb1774a1c4388 (patch) | |
tree | 928b784dc5063f65bd951e2f2f14972f099b00ce /lib/vconn-provider.h | |
parent | a00d4bd03640dff91d3d73a063b6dde91fe52cd1 (diff) |
vconn: Mark class structures as const.
These data structures are never modified so it seems logical for them
to be const.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/vconn-provider.h')
-rw-r--r-- | lib/vconn-provider.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/vconn-provider.h b/lib/vconn-provider.h index e6058f33..640c5b66 100644 --- a/lib/vconn-provider.h +++ b/lib/vconn-provider.h @@ -30,7 +30,7 @@ * * This structure should be treated as opaque by vconn implementations. */ struct vconn { - struct vconn_class *class; + const struct vconn_class *class; int state; int error; @@ -48,7 +48,7 @@ struct vconn { char *name; }; -void vconn_init(struct vconn *, struct vconn_class *, int connect_status, +void vconn_init(struct vconn *, const struct vconn_class *, int connect_status, const char *name, uint32_t allowed_versions); void vconn_free_data(struct vconn *vconn); void vconn_set_remote_ip(struct vconn *, ovs_be32 remote_ip); @@ -143,12 +143,12 @@ struct vconn_class { * * This structure should be treated as opaque by vconn implementations. */ struct pvconn { - struct pvconn_class *class; + const struct pvconn_class *class; char *name; uint32_t allowed_versions; }; -void pvconn_init(struct pvconn *pvconn, struct pvconn_class *class, +void pvconn_init(struct pvconn *pvconn, const struct pvconn_class *class, const char *name, uint32_t allowed_versions); static inline void pvconn_assert_class(const struct pvconn *pvconn, const struct pvconn_class *class) @@ -198,13 +198,13 @@ struct pvconn_class { }; /* Active and passive vconn classes. */ -extern struct vconn_class tcp_vconn_class; -extern struct pvconn_class ptcp_pvconn_class; -extern struct vconn_class unix_vconn_class; -extern struct pvconn_class punix_pvconn_class; +extern const struct vconn_class tcp_vconn_class; +extern const struct pvconn_class ptcp_pvconn_class; +extern const struct vconn_class unix_vconn_class; +extern const struct pvconn_class punix_pvconn_class; #ifdef HAVE_OPENSSL -extern struct vconn_class ssl_vconn_class; -extern struct pvconn_class pssl_pvconn_class; +extern const struct vconn_class ssl_vconn_class; +extern const struct pvconn_class pssl_pvconn_class; #endif #endif /* vconn-provider.h */ |