Lines Matching defs:ifID
309 * ret_status = ddp_add_if(ifID)
312 * ifID pointer to LAP interface's at_if struct.
321 int ddp_add_if(ifID)
322 register at_ifaddr_t *ifID;
327 ("ddp_add_if: called, ifID:0x%x\n", (u_int) ifID));
329 if (ifID->ifFlags & AT_IFF_DEFAULT) {
334 ifID_home = ifID;
354 ifID_table[port] = ifID;
355 ifID->ifPort = port; /* set ddp port # in ifID */
358 TAILQ_INSERT_TAIL(&at_ifQueueHd, ifID, aa_link);
378 * ifID pointer to LAP interface's at_if struct.
381 void ddp_rem_if(ifID)
382 register at_ifaddr_t *ifID;
384 struct ifaddr *ifa = &ifID->aa_ifa;
388 ifnet_lock_exclusive(ifID->aa_ifp);
389 if_detach_ifa(ifID->aa_ifp, ifa);
391 ifnet_lock_done(ifID->aa_ifp);
393 if (ifID->at_was_attached == 0 && ifID->aa_ifp != NULL) {
394 (void)proto_unplumb(PF_APPLETALK, ifID->aa_ifp);
398 if (ifID->ifPort) {
399 if (aarp_table[ifID->ifPort]) {
400 FREE(aarp_table[ifID->ifPort], M_RTABLE);
401 aarp_table[ifID->ifPort] = NULL;
405 ifID->aa_ifp = NULL;
407 trackrouter_rem_if(ifID);
408 TAILQ_REMOVE(&at_ifQueueHd, ifID, aa_link);
409 ifID_table[ifID->ifPort] = NULL;
410 ifID->ifName[0] = '\0';
411 ifID->ifPort = 0;
414 /* *** deallocate ifID, eventually *** */
523 register at_ifaddr_t *ifID = ifID_home, *ifIDTmp = NULL;
545 if (!ifID) {
603 ifID = ifIDTmp;
610 loop = ((ddp->dst_node == ifID->ifThisNode.s_node) &&
611 (dst_net == ifID->ifThisNode.s_net)
617 NET_ASSIGN(ddp->src_net, ifID->ifThisNode.s_net);
618 ddp->src_node = ifID->ifThisNode.s_node;
626 ifID->ifPort));
637 ddp_input(mdata, ifID);
644 error = zip_handle_getmyzone(ifID, *mp);
651 TAILQ_FOREACH(ifID, &at_ifQueueHd, aa_link) {
652 if ((ifID->ifThisNode.s_net == dst_net) || (dst_net == 0))
659 if ((ifID->ifThisCableStart <= dst_net) &&
660 (ifID->ifThisCableEnd >= dst_net)
667 if (ARouterIf == NULL && ATALK_VALUE(ifID->ifARouter))
668 ARouterIf = ifID;
672 (u_int)ifID, ifID ? ifID->ifName : "",
675 if (ifID) {
697 ifID = brt->ifID;
702 if ((ifID = ARouterIf) != NULL)
719 ifID = ifID_home;
721 ddp->src_node = ifID->ifThisNode.s_node;
722 NET_ASSIGN(ddp->src_net, ifID->ifThisNode.s_net);
725 routing_needed(*mp, ifID, TRUE);
731 * which this packet is going out.... ifID.
733 if (ifID->ifState == LAP_OFFLINE) {
753 NET_ASSIGN(at_dest.atalk_net, ifID->ifARouter.s_net);
754 at_dest.atalk_node = ifID->ifARouter.s_node;
766 ddp->src_node = ifID->ifThisNode.s_node;
767 NET_ASSIGN(ddp->src_net, ifID->ifThisNode.s_net);
778 dst_net, ddp->dst_node, ddp->dst_socket, ifID->ifName));
833 if (ifID->ifState == LAP_ONLINE_FOR_ZIP) {
844 ifID->stats.xmit_packets++;
845 ifID->stats.xmit_bytes += gbuf_msgsize(m);
856 aarp_send_data(m,ifID, &dest_at_addr, loop);
859 pat_output(ifID, m, (unsigned char *)&dest_addr, 0);
869 void ddp_input(mp, ifID)
871 register at_ifaddr_t *ifID;
880 ifID, mp, gbuf_len(mp),0);
921 if (!ifID) /* if loop back is specified */
922 ifID = ifID_home; /* that means the home port */
1017 (*ddp_handler[socket].func)(mp, ifID);
1030 (ifID->ifRoutingState < PORT_ONLINE)
1100 ifID->ifPort, ddp->dst_socket));
1108 routing_needed(mp, ifID, FALSE);
1129 int ddp_router_output(mp, ifID, addr_type, router_net, router_node, enet_addr)
1131 at_ifaddr_t *ifID;
1143 if (!ifID) {
1144 dPrintf(D_M_DDP, D_L_WARNING, ("BAD BAD ifID\n"));
1151 if (ifID->ifFlags & AT_IFF_AURP) { /* AURP link? */
1184 if ((ddp->dst_node == ifID->ifThisNode.s_node) &&
1185 (NET_VALUE(ddp->dst_net) == ifID->ifThisNode.s_net)) {
1188 ifID->ifPort, ddp->dst_socket));
1191 ddp_input(mp, ifID);
1202 ifID->ifPort, NET_VALUE(ddp->dst_net), ddp->dst_node, router_net,
1211 ifID->ifPort, NET_VALUE(ddp->dst_net), ddp->dst_node));
1215 if (ifID->ifState == LAP_OFFLINE) {
1273 if (ifID->ifState == LAP_ONLINE_FOR_ZIP) {
1284 ifID->stats.xmit_packets++;
1285 ifID->stats.xmit_bytes += gbuf_msgsize(m);
1296 aarp_send_data(m,ifID,&dest_at_addr, loop);
1299 pat_output(ifID, m, (unsigned char *)&dest_addr, 0);
1329 at_ifaddr_t *ifID;
1396 returns *ifID if it's for us, NULL if not
1401 at_ifaddr_t *ifID;
1403 TAILQ_FOREACH(ifID, &at_ifQueueHd, aa_link) {
1404 if ((ddp->dst_node == ifID->ifThisNode.s_node) &&
1405 (NET_VALUE(ddp->dst_net) == ifID->ifThisNode.s_net)
1408 ("pkt was for port %d\n", ifID->ifPort));
1410 return(ifID);