| 424 | } |
| 425 | |
| 426 | void Mnl_socket_bind(struct mnl_socket *nl, unsigned int groups, pid_t pid) |
| 427 | { |
| 428 | if (mnl_socket_bind(nl, groups, pid) < 0) // groups - 多播组掩码,指定要加入的组播组; pid - 绑定的端口ID(0 表示自动分配) getpid() - 使用进程ID作为端口ID |
| 429 | mnl_socket_error("mnl_socket_bind error"); |
| 430 | } |
| 431 | |
| 432 | ssize_t Mnl_socket_sendto(const struct mnl_socket *nl, const void *req, size_t siz) |
| 433 | { |
no test coverage detected