| | 2698 | | netinpkt(hp, pp) |
| | 2699 | | struct hostd *hp; |
| | 2700 | | struct pkt *pp; |
| | 2701 | | { |
| | 2702 | | struct mca *mcap = 0; |
| | 2703 | | struct task *tp; |
| | 2704 | | struct pmsg *mp; |
| | 2705 | | struct frag *fp; |
| | 2706 | | struct pkt *pp2; |
| | 2707 | | int src = pp->pk_src; |
| | 2708 | | int dst = pp->pk_dst; |
| | 2709 | | int ff = pp->pk_flag; |
| | 2710 | | char *cp; |
| | 2711 | | int i; |
| | 2712 | | int firstmca = 1; |
| | 2713 | | |
| | 2714 | | if (pvmdebmask & PDMPACKET) {
|
| | 2715 | | pvmlogprintf( |
| | 2716 | | "netinpkt() pkt from %s src t%x dst t%x f %s len %d\n", |
| | 2717 | | hp->hd_name, src, dst, pkt_flags(ff), pp->pk_len); |
| | 2718 | | } |
| | 2719 | | |
| | 2720 | | |
| | 2721 | | |
| | 2722 | | if (TIDISMCA(dst)) {
|
| | 2723 | | for (mcap = hp->hd_mcas->mc_link; mcap != hp->hd_mcas; |
| | 2724 | | mcap = mcap->mc_link) |
| | 2725 | | if (mcap->mc_tid == dst) |
| | 2726 | | break; |
| | 2727 | | if (mcap == hp->hd_mcas) |
| | 2728 | | mcap = 0; |
| | 2729 | | } |
| | 2730 | | |
| | 2731 | | if ((dst & tidhmask) != myhostpart && !mcap) { |
| | 2732 | | if (pvmdebmask & (PDMPACKET|PDMAPPL)) {
|
| | 2733 | | pvmlogprintf( |
| | 2734 | | "netinpkt() pkt from t%x for t%x scrapped (not us)\n", |
| | 2735 | | src, dst); |
| | 2736 | | } |
| | 2737 | | goto done; |
| | 2738 | | } |
| | 2739 | | |
| | 2740 | | if (mcap) { |
| | 2741 | | |
| | 2742 | | for (i = mcap->mc_ndst; i-- > 0; ) { |
| | 2743 | | dst = mcap->mc_dsts[i]; |
| | 2744 | | if (tp = task_find(dst)) { |
| | 2745 | | pp2 = pk_new(0); |
| | 2746 | | pp2->pk_src = src; |
| | 2747 | | pp2->pk_dst = dst; |
| | 2748 | | pp2->pk_flag = ff; |
| | 2749 | | |
| | 2750 | | #if defined(IMA_MPP) |
| | | | ... |
| | 2780 | | if (ff & FFEOM) {
|
| | 2781 | | if (pvmdebmask & PDMMESSAGE) {
|
| | 2782 | | pvmlogprintf("netinpkt() freed mca %x from t%x\n", |
| | 2783 | | mcap->mc_tid, hp->hd_name); |
| | 2784 | | } |
| | 2785 | | mca_free(mcap); |
| | 2786 | | } |
| | 2787 | | goto done; |
| | 2788 | | } |
| | 2789 | | |
| | 2790 | | if ((dst & ~tidhmask) == TIDPVMD) {
|
| | 2791 | | if (ff & FFSOM) {
|
| | 2792 | | if (hp->hd_rxm) { |
| | 2793 | | pvmlogprintf("netinpkt() repeated start pkt from %s\n", |
| | 2794 | | hp->hd_name); |
| | 2795 | | goto done; |
| | 2796 | | } |