hglookup.c,v
来自「TCP-IP红宝书源代码」· C,V 代码 · 共 54 行
C,V
54 行
head 1.1;
access;
symbols;
locks
dls:1.1; strict;
comment @ * @;
1.1
date 97.09.21.19.26.58; author dls; state Dist;
branches;
next ;
desc
@@
1.1
log
@pre-3e code
@
text
@/* hglookup.c - hglookup */
#include <conf.h>
#include <kernel.h>
#include <network.h>
#include <igmp.h>
/*------------------------------------------------------------------------
* hglookup - get host group entry (if any) for a group
* N.B. - Assumes HostGroup.hi_mutex *held*
*------------------------------------------------------------------------
*/
struct hg *hglookup(ifnum, ipa)
unsigned int ifnum; /* interface for the host group */
IPaddr ipa; /* IP multicast address */
{
struct hg *phg;
int i;
phg = &hgtable[0];
for (i=0; i < HG_TSIZE; ++i, ++phg) {
if (phg->hg_state == HGS_FREE)
continue;
if (ifnum == phg->hg_ifnum && ipa == phg->hg_ipa)
return phg;
}
return 0;
}
@
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?