Hi, I try to use the qdisc and class API of libnl and I can create a qdisc root or qdisc leaf, but can't add a class on the qdisc root, I've got this error : Unable to connect netlink socketbind() failed (errno = Operation not permitted) Function for add a class : int add_class(struct nl_handle *nlh, int ifindex, char *hndl, char *prt, uint32_t prio, uint32_t rate, uint32_t ceil) { struct rtnl_class *class; uint32_t handle, parent; int err = 0; class = rtnl_class_alloc(); if (!class) return -1; rtnl_class_set_kind(class, "htb"); rtnl_class_set_ifindex(class, ifindex); if (rtnl_tc_str2handle(hndl, &handle) < 0) { fprintf(stderr, "%s\n", nl_geterror()); goto errout_free_class; } rtnl_class_set_handle(class, handle); if (rtnl_tc_str2handle(prt, &parent) < 0) { fprintf(stderr, "%s\n", nl_geterror()); goto errout_free_class; } rtnl_class_set_parent(class, parent); if(prio) rtnl_htb_set_prio(class, prio); rtnl_htb_set_rate(class, rate); if(ceil) rtnl_htb_set_ceil(class, ceil); if (nltool_connect(nlh, NETLINK_ROUTE) < 0) goto errout_free_class; if ((err = rtnl_class_add(nlh, class, NLM_F_REPLACE)) < 0) { fprintf(stderr, "Unable to add Qdisc: %s\n", nl_geterror()); goto errout_add; } rtnl_class_put(class); return err; errout_free_class: rtnl_class_put(class); return -1; errout_add: rtnl_class_put(class); return err; } Do you have an idea ? Edouard. - To unsubscribe from this list: send the line "unsubscribe linux-net" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html