From: Oliver Hartkopp Date: Sat, 20 Feb 2010 20:41:24 +0000 (+0000) Subject: Moved kernel parsing of netlink attributes into can_can_parse_attr(). X-Git-Url: https://rtime.felk.cvut.cz/gitweb/sojka/can-utils.git/commitdiff_plain/0dc9fcc98ede291a27f04945b38ec9723428c913 Moved kernel parsing of netlink attributes into can_can_parse_attr(). Added functionalitiy to remove formerly created CAN GW jobs. --- diff --git a/cangw.c b/cangw.c index 5e1ddc5..d6dff90 100644 --- a/cangw.c +++ b/cangw.c @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -305,10 +306,15 @@ int main(int argc, char **argv) switch (cmd) { case ADD: - req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_EXCL; + req.n.nlmsg_flags = NLM_F_REQUEST; req.n.nlmsg_type = RTM_NEWROUTE; break; + case DEL: + req.n.nlmsg_flags = NLM_F_REQUEST; + req.n.nlmsg_type = RTM_DELROUTE; + break; + default: printf("This function is not yet implemented.\n"); exit(1);