Lines Matching refs:link
1 #include <netlink/route/link/sit.h>
7 struct rtnl_link *link;
30 link = rtnl_link_sit_alloc();
31 if(!link) {
32 nl_perror(err, "Unable to allocate link");
36 rtnl_link_set_name(link, "sit-tun");
37 rtnl_link_sit_set_link(link, if_index);
40 rtnl_link_sit_set_local(link, addr.s_addr);
43 rtnl_link_sit_set_remote(link, addr.s_addr);
45 rtnl_link_sit_set_ttl(link, 64);
46 err = rtnl_link_add(sk, link, NLM_F_CREATE);
48 nl_perror(err, "Unable to add link");
52 rtnl_link_put(link);