Lines Matching refs:rt
414 ng_btsocket_l2cap_rtentry_p rt) in ng_btsocket_l2cap_process_l2ca_con_req_rsp() argument
522 ng_btsocket_l2cap_rtentry_p rt) in ng_btsocket_l2cap_process_l2ca_con_rsp_rsp() argument
589 ng_btsocket_l2cap_rtentry_p rt) in ng_btsocket_l2cap_process_l2ca_con_ind() argument
606 rt->src.b[5], rt->src.b[4], rt->src.b[3], in ng_btsocket_l2cap_process_l2ca_con_ind()
607 rt->src.b[2], rt->src.b[1], rt->src.b[0], in ng_btsocket_l2cap_process_l2ca_con_ind()
614 pcb = ng_btsocket_l2cap_pcb_by_addr(&rt->src, ip->psm); in ng_btsocket_l2cap_process_l2ca_con_ind()
644 bcopy(&rt->src, &pcb1->src, sizeof(pcb1->src)); in ng_btsocket_l2cap_process_l2ca_con_ind()
651 pcb1->rt = rt; in ng_btsocket_l2cap_process_l2ca_con_ind()
664 error = ng_btsocket_l2cap_send_l2ca_con_rsp_req(token, rt, in ng_btsocket_l2cap_process_l2ca_con_ind()
691 … int ng_btsocket_l2cap_process_l2ca_enc_change(struct ng_mesg *msg, ng_btsocket_l2cap_rtentry_p rt) in ng_btsocket_l2cap_process_l2ca_enc_change() argument
703 pcb = ng_btsocket_l2cap_pcb_by_cid(&rt->src, op->lcid, in ng_btsocket_l2cap_process_l2ca_enc_change()
739 ng_btsocket_l2cap_rtentry_p rt) in ng_btsocket_l2cap_process_l2ca_cfg_req_rsp() argument
856 ng_btsocket_l2cap_rtentry_p rt) in ng_btsocket_l2cap_process_l2ca_cfg_rsp_rsp() argument
951 ng_btsocket_l2cap_rtentry_p rt) in ng_btsocket_l2cap_process_l2ca_cfg_ind() argument
965 pcb = ng_btsocket_l2cap_pcb_by_cid(&rt->src, ip->lcid, in ng_btsocket_l2cap_process_l2ca_cfg_ind()
1036 ng_btsocket_l2cap_rtentry_p rt) in ng_btsocket_l2cap_process_l2ca_discon_rsp() argument
1093 ng_btsocket_l2cap_rtentry_p rt) in ng_btsocket_l2cap_process_l2ca_discon_ind() argument
1107 pcb = ng_btsocket_l2cap_pcb_by_cid(&rt->src, ip->lcid, in ng_btsocket_l2cap_process_l2ca_discon_ind()
1150 ng_btsocket_l2cap_rtentry_p rt) in ng_btsocket_l2cap_process_l2ca_write_rsp() argument
1230 if (pcb->rt == NULL || in ng_btsocket_l2cap_send_l2ca_con_req()
1231 pcb->rt->hook == NULL || NG_HOOK_NOT_VALID(pcb->rt->hook)) in ng_btsocket_l2cap_send_l2ca_con_req()
1246 NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_node, msg,pcb->rt->hook, 0); in ng_btsocket_l2cap_send_l2ca_con_req()
1257 ng_btsocket_l2cap_rtentry_p rt, bdaddr_p dst, int ident, in ng_btsocket_l2cap_send_l2ca_con_rsp_req() argument
1264 if (rt == NULL || rt->hook == NULL || NG_HOOK_NOT_VALID(rt->hook)) in ng_btsocket_l2cap_send_l2ca_con_rsp_req()
1282 NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_node, msg, rt->hook, 0); in ng_btsocket_l2cap_send_l2ca_con_rsp_req()
1300 if (pcb->rt == NULL || in ng_btsocket_l2cap_send_l2ca_cfg_req()
1301 pcb->rt->hook == NULL || NG_HOOK_NOT_VALID(pcb->rt->hook)) in ng_btsocket_l2cap_send_l2ca_cfg_req()
1318 NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_node, msg,pcb->rt->hook, 0); in ng_btsocket_l2cap_send_l2ca_cfg_req()
1336 if (pcb->rt == NULL || in ng_btsocket_l2cap_send_l2ca_cfg_rsp()
1337 pcb->rt->hook == NULL || NG_HOOK_NOT_VALID(pcb->rt->hook)) in ng_btsocket_l2cap_send_l2ca_cfg_rsp()
1352 NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_node, msg, pcb->rt->hook, 0); in ng_btsocket_l2cap_send_l2ca_cfg_rsp()
1371 if (pcb->rt == NULL || in ng_btsocket_l2cap_send_l2ca_discon_req()
1372 pcb->rt->hook == NULL || NG_HOOK_NOT_VALID(pcb->rt->hook)) in ng_btsocket_l2cap_send_l2ca_discon_req()
1386 NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_node, msg,pcb->rt->hook, 0); in ng_btsocket_l2cap_send_l2ca_discon_req()
1407 ng_btsocket_l2cap_rtentry_t *rt = NULL; in ng_btsocket_l2cap_data_input() local
1416 rt = (ng_btsocket_l2cap_rtentry_t *) NG_HOOK_PRIVATE(hook); in ng_btsocket_l2cap_data_input()
1417 if (rt == NULL) { in ng_btsocket_l2cap_data_input()
1466 rt->src.b[5], rt->src.b[4], rt->src.b[3], in ng_btsocket_l2cap_data_input()
1467 rt->src.b[2], rt->src.b[1], rt->src.b[0], in ng_btsocket_l2cap_data_input()
1477 pcb = ng_btsocket_l2cap_pcb_by_cid(&rt->src, hdr->dcid,idtype); in ng_btsocket_l2cap_data_input()
1489 rt->src.b[5], rt->src.b[4], rt->src.b[3], in ng_btsocket_l2cap_data_input()
1490 rt->src.b[2], rt->src.b[1], rt->src.b[0], in ng_btsocket_l2cap_data_input()
1504 rt->src.b[5], rt->src.b[4], rt->src.b[3], in ng_btsocket_l2cap_data_input()
1505 rt->src.b[2], rt->src.b[1], rt->src.b[0], in ng_btsocket_l2cap_data_input()
1526 rt->src.b[5], rt->src.b[4], rt->src.b[3], in ng_btsocket_l2cap_data_input()
1527 rt->src.b[2], rt->src.b[1], rt->src.b[0], in ng_btsocket_l2cap_data_input()
1553 rt->src.b[5], rt->src.b[4], rt->src.b[3], in ng_btsocket_l2cap_data_input()
1554 rt->src.b[2], rt->src.b[1], rt->src.b[0], in ng_btsocket_l2cap_data_input()
1565 rt->src.b[5], rt->src.b[4], rt->src.b[3], in ng_btsocket_l2cap_data_input()
1566 rt->src.b[2], rt->src.b[1], rt->src.b[0], in ng_btsocket_l2cap_data_input()
1585 rt->src.b[5], rt->src.b[4], rt->src.b[3], in ng_btsocket_l2cap_data_input()
1586 rt->src.b[2], rt->src.b[1], rt->src.b[0], in ng_btsocket_l2cap_data_input()
1596 if (bcmp(&rt->src, &pcb->src, sizeof(pcb->src)) != 0 || in ng_btsocket_l2cap_data_input()
1633 ng_btsocket_l2cap_rtentry_t *rt = NULL; in ng_btsocket_l2cap_default_msg_input() local
1644 rt = (ng_btsocket_l2cap_rtentry_t *) NG_HOOK_PRIVATE(hook); in ng_btsocket_l2cap_default_msg_input()
1645 if (rt == NULL) { in ng_btsocket_l2cap_default_msg_input()
1646 rt = malloc(sizeof(*rt), in ng_btsocket_l2cap_default_msg_input()
1648 if (rt == NULL) { in ng_btsocket_l2cap_default_msg_input()
1653 LIST_INSERT_HEAD(&ng_btsocket_l2cap_rt, rt, next); in ng_btsocket_l2cap_default_msg_input()
1655 NG_HOOK_SET_PRIVATE(hook, rt); in ng_btsocket_l2cap_default_msg_input()
1658 bcopy(&ep->addr, &rt->src, sizeof(rt->src)); in ng_btsocket_l2cap_default_msg_input()
1659 rt->hook = hook; in ng_btsocket_l2cap_default_msg_input()
1666 rt->src.b[5], rt->src.b[4], rt->src.b[3], in ng_btsocket_l2cap_default_msg_input()
1667 rt->src.b[2], rt->src.b[1], rt->src.b[0]); in ng_btsocket_l2cap_default_msg_input()
1686 ng_btsocket_l2cap_rtentry_p rt = NULL; in ng_btsocket_l2cap_l2ca_msg_input() local
1694 rt = (ng_btsocket_l2cap_rtentry_p) NG_HOOK_PRIVATE(hook); in ng_btsocket_l2cap_l2ca_msg_input()
1695 if (rt == NULL) { in ng_btsocket_l2cap_l2ca_msg_input()
1703 ng_btsocket_l2cap_process_l2ca_con_req_rsp(msg, rt); in ng_btsocket_l2cap_l2ca_msg_input()
1707 ng_btsocket_l2cap_process_l2ca_con_rsp_rsp(msg, rt); in ng_btsocket_l2cap_l2ca_msg_input()
1711 ng_btsocket_l2cap_process_l2ca_con_ind(msg, rt); in ng_btsocket_l2cap_l2ca_msg_input()
1715 ng_btsocket_l2cap_process_l2ca_cfg_req_rsp(msg, rt); in ng_btsocket_l2cap_l2ca_msg_input()
1719 ng_btsocket_l2cap_process_l2ca_cfg_rsp_rsp(msg, rt); in ng_btsocket_l2cap_l2ca_msg_input()
1723 ng_btsocket_l2cap_process_l2ca_cfg_ind(msg, rt); in ng_btsocket_l2cap_l2ca_msg_input()
1727 ng_btsocket_l2cap_process_l2ca_discon_rsp(msg, rt); in ng_btsocket_l2cap_l2ca_msg_input()
1731 ng_btsocket_l2cap_process_l2ca_discon_ind(msg, rt); in ng_btsocket_l2cap_l2ca_msg_input()
1735 ng_btsocket_l2cap_process_l2ca_write_rsp(msg, rt); in ng_btsocket_l2cap_l2ca_msg_input()
1738 ng_btsocket_l2cap_process_l2ca_enc_change(msg, rt); in ng_btsocket_l2cap_l2ca_msg_input()
1830 ng_btsocket_l2cap_rtentry_p rt = NULL; in ng_btsocket_l2cap_rtclean() local
1843 if (pcb->rt != NULL && in ng_btsocket_l2cap_rtclean()
1844 pcb->rt->hook != NULL && NG_HOOK_NOT_VALID(pcb->rt->hook)) { in ng_btsocket_l2cap_rtclean()
1854 pcb->rt = NULL; in ng_btsocket_l2cap_rtclean()
1865 for (rt = LIST_FIRST(&ng_btsocket_l2cap_rt); rt != NULL; ) { in ng_btsocket_l2cap_rtclean()
1866 ng_btsocket_l2cap_rtentry_p rt_next = LIST_NEXT(rt, next); in ng_btsocket_l2cap_rtclean()
1868 if (rt->hook != NULL && NG_HOOK_NOT_VALID(rt->hook)) { in ng_btsocket_l2cap_rtclean()
1869 LIST_REMOVE(rt, next); in ng_btsocket_l2cap_rtclean()
1871 NG_HOOK_SET_PRIVATE(rt->hook, NULL); in ng_btsocket_l2cap_rtclean()
1872 NG_HOOK_UNREF(rt->hook); /* Remove extra reference */ in ng_btsocket_l2cap_rtclean()
1874 bzero(rt, sizeof(*rt)); in ng_btsocket_l2cap_rtclean()
1875 free(rt, M_NETGRAPH_BTSOCKET_L2CAP); in ng_btsocket_l2cap_rtclean()
1878 rt = rt_next; in ng_btsocket_l2cap_rtclean()
2151 ng_btsocket_l2cap_rtentry_t *rt = NULL; in ng_btsocket_l2cap_connect() local
2212 pcb->rt = NULL; in ng_btsocket_l2cap_connect()
2215 LIST_FOREACH(rt, &ng_btsocket_l2cap_rt, next) { in ng_btsocket_l2cap_connect()
2216 if (rt->hook == NULL || NG_HOOK_NOT_VALID(rt->hook)) in ng_btsocket_l2cap_connect()
2221 if (bcmp(&pcb->src, &rt->src, sizeof(rt->src)) == 0) in ng_btsocket_l2cap_connect()
2224 if (bcmp(&pcb->dst, &rt->src, sizeof(rt->src)) != 0) in ng_btsocket_l2cap_connect()
2229 if (rt != NULL) { in ng_btsocket_l2cap_connect()
2230 pcb->rt = rt; in ng_btsocket_l2cap_connect()
2233 bcopy(&rt->src, &pcb->src, sizeof(pcb->src)); in ng_btsocket_l2cap_connect()
2581 if (pcb->rt == NULL || in ng_btsocket_l2cap_send()
2582 pcb->rt->hook == NULL || NG_HOOK_NOT_VALID(pcb->rt->hook)) { in ng_btsocket_l2cap_send()
2672 NG_SEND_DATA_ONLY(error, pcb->rt->hook, m); in ng_btsocket_l2cap_send2()