~ubuntu-branches/ubuntu/trusty/libnl3/trusty

« back to all changes in this revision

Viewing changes to doc/src/examples/nl_send_simple.c

  • Committer: Bazaar Package Importer
  • Author(s): Heiko Stuebner
  • Date: 2011-05-21 19:25:13 UTC
  • Revision ID: james.westby@ubuntu.com-20110521192513-1ieyu9w9kym4bt16
Tags: upstream-3.0
ImportĀ upstreamĀ versionĀ 3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <netlink/netlink.h>
 
2
 
 
3
struct nl_sock *sk;
 
4
struct rtgenmsg rt_hdr = {
 
5
        .rtgen_family = AF_UNSPEC,
 
6
};
 
7
 
 
8
sk = nl_socket_alloc();
 
9
nl_connect(sk, NETLINK_ROUTE);
 
10
 
 
11
nl_send_simple(sock, RTM_GETLINK, NLM_F_DUMP, &rt_hdr, sizeof(rt_hdr));