~james-page/ubuntu/saucy/openvswitch/1.12-snapshot

« back to all changes in this revision

Viewing changes to lib/netlink-socket.h

  • Committer: James Page
  • Date: 2013-08-21 10:16:57 UTC
  • mfrom: (1.1.20)
  • Revision ID: james.page@canonical.com-20130821101657-3o0z0qeiv5zkwlzi
New upstream snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc.
 
2
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 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.
30
30
 * are Linux-specific.  For Netlink protocol definitions, see
31
31
 * netlink-protocol.h.  For helper functions for working with Netlink messages,
32
32
 * see netlink.h.
 
33
 *
 
34
 *
 
35
 * Thread-safety
 
36
 * =============
 
37
 *
 
38
 * Only a single thread may use a given nl_sock or nl_dump at one time.
33
39
 */
34
40
 
35
41
#include <stdbool.h>
84
90
void nl_sock_transact_multiple(struct nl_sock *,
85
91
                               struct nl_transaction **, size_t n);
86
92
 
 
93
/* Transactions without an allocated socket. */
 
94
int nl_transact(int protocol, const struct ofpbuf *request,
 
95
                struct ofpbuf **replyp);
 
96
void nl_transact_multiple(int protocol, struct nl_transaction **, size_t n);
 
97
 
87
98
/* Table dumping. */
88
99
struct nl_dump {
89
100
    struct nl_sock *sock;       /* Socket being dumped. */
92
103
    int status;                 /* 0=OK, EOF=done, or positive errno value. */
93
104
};
94
105
 
95
 
void nl_dump_start(struct nl_dump *, struct nl_sock *,
 
106
void nl_dump_start(struct nl_dump *, int protocol,
96
107
                   const struct ofpbuf *request);
97
108
bool nl_dump_next(struct nl_dump *, struct ofpbuf *reply);
98
109
int nl_dump_done(struct nl_dump *);