Home | History | Annotate | Download | only in src

Lines Matching refs:hndl

90 * @param *hndl RmNet handle for this transaction
105 static uint16_t rmnetctl_transact(rmnetctl_hndl_t *hndl,
119 if (!hndl){
149 nlmsghdr_val->nlmsg_seq = hndl->transaction_id;
150 nlmsghdr_val->nlmsg_pid = hndl->pid;
157 hndl->transaction_id++;
159 saddr_ptr = &hndl->dest_addr;
161 if (sendto(hndl->netlink_fd,
173 saddr_ptr = &hndl->src_addr;
174 bytes_read = recvfrom(hndl->netlink_fd,
313 int rmnetctl_init(rmnetctl_hndl_t **hndl, uint16_t *error_code)
319 if ((!hndl) || (!error_code)){
324 *hndl = (rmnetctl_hndl_t *)malloc(sizeof(rmnetctl_hndl_t));
325 if (!*hndl) {
330 memset(*hndl, 0, sizeof(rmnetctl_hndl_t));
334 free(*hndl);
338 (*hndl)->pid = (uint32_t)pid;
341 free(*hndl);
346 (*hndl)->netlink_fd = netlink_fd;
348 memset(&(*hndl)->src_addr, 0, sizeof(struct sockaddr_nl));
350 (*hndl)->src_addr.nl_family = AF_NETLINK;
351 (*hndl)->src_addr.nl_pid = (*hndl)->pid;
353 saddr_ptr = &(*hndl)->src_addr;
354 if (bind((*hndl)->netlink_fd,
357 close((*hndl)->netlink_fd);
358 free(*hndl);
363 memset(&(*hndl)->dest_addr, 0, sizeof(struct sockaddr_nl));
365 (*hndl)->dest_addr.nl_family = AF_NETLINK;
366 (*hndl)->dest_addr.nl_pid = KERNEL_PROCESS_ID;
367 (*hndl)->dest_addr.nl_groups = UNICAST;
374 void rmnetctl_cleanup(rmnetctl_hndl_t *hndl)
376 if (!hndl)
378 close(hndl->netlink_fd);
379 free(hndl);
382 int rmnet_associate_network_device(rmnetctl_hndl_t *hndl,
391 if ((!hndl) || (!error_code) || _rmnetctl_check_dev_name(dev_name) ||
408 if ((*error_code = rmnetctl_transact(hndl, &request, &response))
418 int rmnet_get_network_device_associated(rmnetctl_hndl_t *hndl,
426 if ((!hndl) || (!register_status) || (!error_code) ||
439 if ((*error_code = rmnetctl_transact(hndl, &request, &response))
458 int rmnet_set_link_egress_data_format(rmnetctl_hndl_t *hndl,
468 if ((!hndl) || (!error_code) || _rmnetctl_check_dev_name(dev_name) ||
488 if ((*error_code = rmnetctl_transact(hndl, &request, &response))
500 int rmnet_get_link_egress_data_format(rmnetctl_hndl_t *hndl,
510 if ((!hndl) || (!egress_flags) || (!agg_size) || (!agg_count) ||
524 if ((*error_code = rmnetctl_transact(hndl, &request, &response))
545 int rmnet_set_link_ingress_data_format_tailspace(rmnetctl_hndl_t *hndl,
554 if ((!hndl) || (!error_code) || _rmnetctl_check_dev_name(dev_name) ||
572 if ((*error_code = rmnetctl_transact(hndl, &request, &response))
584 int rmnet_get_link_ingress_data_format_tailspace(rmnetctl_hndl_t *hndl,
593 if ((!hndl) || (!error_code) ||
608 if ((*error_code = rmnetctl_transact(hndl, &request, &response))
632 int rmnet_set_logical_ep_config(rmnetctl_hndl_t *hndl,
642 if ((!hndl) || ((ep_id < -1) || (ep_id > 31)) || (!error_code) ||
668 if ((*error_code = rmnetctl_transact(hndl, &request, &response))
679 int rmnet_unset_logical_ep_config(rmnetctl_hndl_t *hndl,
688 if ((!hndl) || ((ep_id < -1) || (ep_id > 31)) || (!error_code) ||
706 if ((*error_code = rmnetctl_transact(hndl, &request, &response))
718 int rmnet_get_logical_ep_config(rmnetctl_hndl_t *hndl,
729 if ((!hndl) || (!operating_mode) || (!error_code) || ((ep_id < -1) ||
747 if ((*error_code = rmnetctl_transact(hndl, &request, &response))
772 int rmnet_new_vnd_prefix(rmnetctl_hndl_t *hndl,
782 if ((!hndl) || (!error_code) ||
807 if ((*error_code = rmnetctl_transact(hndl, &request, &response))
818 int rmnet_new_vnd(rmnetctl_hndl_t *hndl,
823 return rmnet_new_vnd_prefix(hndl, id, error_code, new_vnd, 0);
826 int rmnet_get_vnd_name(rmnetctl_hndl_t *hndl,
836 if ((!hndl) || (!error_code) || (!buf) || (0 == buflen)) {
846 if ((*error_code = rmnetctl_transact(hndl, &request, &response))
872 int rmnet_add_del_vnd_tc_flow(rmnetctl_hndl_t *hndl,
881 if ((!hndl) || (!error_code) || ((set_flow != RMNETCTL_ADD_FLOW) &&
896 if ((*error_code = rmnetctl_transact(hndl, &request, &response))