X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Funixctl.h;h=2ab9a6853c02425b3acef7cae42c86775582deff;hb=6e11a6a15519561d932a018b2ca19dc3acee87c2;hp=18748aa766e54aa9020eccd29a6bf1bb087c254a;hpb=34e63086edddcae06d7c1a4fa84fec0861e50758;p=openvswitch diff --git a/lib/unixctl.h b/lib/unixctl.h index 18748aa7..2ab9a685 100644 --- a/lib/unixctl.h +++ b/lib/unixctl.h @@ -17,6 +17,10 @@ #ifndef UNIXCTL_H #define UNIXCTL_H 1 +#ifdef __cplusplus +extern "C" { +#endif + /* Server for Unix domain socket control connection. */ struct unixctl_server; int unixctl_server_create(const char *path, struct unixctl_server **); @@ -35,10 +39,15 @@ const char *unixctl_client_target(const struct unixctl_client *); /* Command registration. */ struct unixctl_conn; +typedef void unixctl_cb_func(struct unixctl_conn *, + const char *args, void *aux); void unixctl_command_register(const char *name, - void (*cb)(struct unixctl_conn *, - const char *args)); + unixctl_cb_func *cb, void *aux); void unixctl_command_reply(struct unixctl_conn *, int code, const char *body); +#ifdef __cplusplus +} +#endif + #endif /* unixctl.h */