Lines Matching defs:rt

367 			ng_btsocket_l2cap_rtentry_t	*rt = NULL;
377 rt = (ng_btsocket_l2cap_rtentry_t *)
379 if (rt == NULL) {
380 rt = malloc(sizeof(*rt),
383 if (rt == NULL)
386 NG_HOOK_SET_PRIVATE(hook, rt);
391 rt, next);
395 bcopy(msg->data, &rt->src, sizeof(rt->src));
396 rt->hook = hook;
401 rt->src.b[5], rt->src.b[4], rt->src.b[3],
402 rt->src.b[2], rt->src.b[1], rt->src.b[0]);
457 ng_btsocket_l2cap_rtentry_p rt = NULL;
468 if (pcb->rt != NULL &&
469 pcb->rt->hook != NULL && NG_HOOK_NOT_VALID(pcb->rt->hook)) {
474 pcb->rt = NULL;
488 for (rt = LIST_FIRST(&ng_btsocket_l2cap_raw_rt); rt != NULL; ) {
489 ng_btsocket_l2cap_rtentry_p rt_next = LIST_NEXT(rt, next);
491 if (rt->hook != NULL && NG_HOOK_NOT_VALID(rt->hook)) {
492 LIST_REMOVE(rt, next);
494 NG_HOOK_SET_PRIVATE(rt->hook, NULL);
495 NG_HOOK_UNREF(rt->hook); /* Remove extra reference */
497 bzero(rt, sizeof(*rt));
498 free(rt, M_NETGRAPH_BTSOCKET_L2CAP_RAW);
501 rt = rt_next;
652 ng_btsocket_l2cap_rtentry_t *rt = NULL;
670 LIST_FOREACH(rt, &ng_btsocket_l2cap_raw_rt, next) {
671 if (rt->hook == NULL || NG_HOOK_NOT_VALID(rt->hook))
674 if (bcmp(&sa->l2cap_bdaddr, &rt->src,
675 sizeof(rt->src)) == 0)
681 if (rt == NULL)
684 rt = NULL;
688 pcb->rt = rt;
704 ng_btsocket_l2cap_rtentry_t *rt = NULL;
735 if (pcb->rt != NULL) {
748 LIST_FOREACH(rt, &ng_btsocket_l2cap_raw_rt, next) {
749 if (rt->hook == NULL || NG_HOOK_NOT_VALID(rt->hook))
752 if (bcmp(&pcb->dst, &rt->src, sizeof(rt->src)) != 0)
756 if (rt != NULL) {
759 pcb->rt = rt;
760 bcopy(&rt->src, &pcb->src, sizeof(pcb->src));
792 if (pcb->rt == NULL) {
827 error = ng_btsocket_l2cap_raw_send_ngmsg(pcb->rt->hook,
858 pcb->rt->hook, 0);
913 pcb->rt->hook, 0);
981 pcb->rt->hook, 0);
1042 pcb->rt->hook, 0);
1085 error = ng_btsocket_l2cap_raw_send_ngmsg(pcb->rt->hook,
1146 pcb->rt = NULL;
1284 pcb->rt->hook, 0);