Re: IP_MAX_MEMBERSHIPS ???

Tuan Hoang (tuan@optimus.mitre.org)
Fri, 16 Apr 1999 17:23:31 -0400 (EDT)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

--494976478-1517374193-924297811=:4312
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hi Alan,

Thanks for getting back to me. I've decided to try to use the _sysctl()
way just because these are going to be stock (hopefully soon) RH 6.0
systems. I'm getting funny results. I've attached the C++
program. Here's the output of my little test program "igmptest":

[root@optimus igmptest]# cat /proc/sys/net/ipv4/igmp_max_memberships
20
[root@optimus igmptest]# ./igmptest 256
Setting NET_IPV4_IGMP_MAX_MEMBERSHIPS = 256
Old value = _
New value = 256
[root@optimus igmptest]# cat /proc/sys/net/ipv4/igmp_max_memberships
3552562
[root@optimus igmptest]# ./igmptest 1000
Setting NET_IPV4_IGMP_MAX_MEMBERSHIPS = 1000
Old value = 256
New value = 1000
[root@optimus igmptest]# cat /proc/sys/net/ipv4/igmp_max_memberships
808464433

Thanks for any help.
Tuan

On Fri, 16 Apr 1999, Alan Cox wrote:

> > I remember the old IP_MAX_MEMBERSHIPS variable in <linux/in.h> under the
> > 2.0 kernels. Under 2.2.5 I think it's been changed to
> > NET_IPV4_IGMP_MAX_MEMBERSHIPS in <linux/sysctl.h>.
> > I used to just recompile the kernel after changing that value from 20 to
> > 256. I guess it's a cleaner way of changing it's value but is _sysctl()
> > the only way I can change it?
>
> echo "256" >/proc/sys/net/ipv4/igmp_max_memberships
>
> is nice and easy from boot scripts
>
>
> Alan
> ---
> "The IETF already has more than enough RFCs that codify the obvious, make
> stupidity illegal, support truth, justice, and the IETF way, and generally
> demonstrate the author is a brilliant and valuable Contributor to The
> Standards Process." -- Vernon Schryver
>

--494976478-1517374193-924297811=:4312
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="igmptest.C"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.10.9904161723311.4312@optimus.mitre.org>
Content-Description:
Content-Disposition: attachment; filename="igmptest.C"

I2luY2x1ZGUgPGlvc3RyZWFtLmg+DQojaW5jbHVkZSA8c3RkbGliLmg+DQoj
aW5jbHVkZSA8c3RyaW5nLmg+DQojaW5jbHVkZSA8c3RyaW5nPg0KI2luY2x1
ZGUgPHVuaXN0ZC5oPg0KI2luY2x1ZGUgPHN5cy90eXBlcy5oPg0KI2luY2x1
ZGUgPG5ldGluZXQvaW4uaD4NCiNpbmNsdWRlIDxlcnJuby5oPg0KDQpleHRl
cm4gaW50IGVycm5vOw0KDQojaW5jbHVkZSA8bGludXgvdW5pc3RkLmg+DQoj
aW5jbHVkZSA8bGludXgvc3lzY3RsLmg+DQoNCl9zeXNjYWxsMShpbnQsIF9z
eXNjdGwsIHN0cnVjdCBfX3N5c2N0bF9hcmdzICosIGFyZ3MpOw0KaW50IF9z
eXNjdGwoc3RydWN0IF9fc3lzY3RsX2FyZ3MgKmFyZ3MpOw0KDQppbnQgbWFp
biggaW50IGFyZ2MsIGNoYXIgKmFyZ3ZbXSApIHsNCiAgaWYgKCBhcmdjICE9
IDIgKSB7DQogICAgY2VyciA8PCAiVXNhZ2U6ICIgPDwgYXJndlswXSA8PCAi
IDxJR01QX01BWF9NRU1CRVJTSElQUz4iIDw8IGVuZGw7DQogICAgZXhpdCgg
MSApOw0KICB9DQoNCiAgY291dCA8PCAiU2V0dGluZyBORVRfSVBWNF9JR01Q
X01BWF9NRU1CRVJTSElQUyA9ICIgPDwgYXJndlsxXSA8PCBlbmRsOw0KDQoN
CiNkZWZpbmUgU0laRSh4KSBzaXplb2YoeCkvc2l6ZW9mKHhbMF0pDQojZGVm
aW5lIE5BTUVTWiBDVExfTUFYTkFNRQ0KDQogIHN0cnVjdCBfX3N5c2N0bF9h
cmdzIGFyZ3M7DQogIGludCBuYW1lW10gPSB7IENUTF9ORVQsIE5FVF9JUFY0
LCBORVRfSVBWNF9JR01QX01BWF9NRU1CRVJTSElQUyB9Ow0KICBjaGFyIG9s
ZHZhbFtOQU1FU1pdOw0KICBzaXplX3Qgb2xkbGVucCA9IHNpemVvZiggb2xk
dmFsICk7DQogIGNoYXIgbmV3dmFsW05BTUVTWl07DQogIHN0cmNweSggbmV3
dmFsLCBhcmd2WzFdICk7DQoNCiAgYXJncy5uYW1lID0gbmFtZTsNCiAgYXJn
cy5ubGVuID0gU0laRShuYW1lKTsNCiAgYXJncy5vbGR2YWwgPSBvbGR2YWw7
DQogIGFyZ3Mub2xkbGVucCA9ICZvbGRsZW5wOw0KICBhcmdzLm5ld3ZhbCA9
IG5ld3ZhbDsNCiAgYXJncy5uZXdsZW4gPSBzaXplb2YoIG5ld3ZhbCApOw0K
DQogIGludCBydiA9IF9zeXNjdGwoICZhcmdzICk7DQoNCiAgaWYgKCBydiA9
PSAwICkgew0KICAgIG9sZHZhbFsgb2xkbGVucCBdID0gJ1wwJzsNCiAgICBj
b3V0IDw8ICJPbGQgdmFsdWUgPSAiIDw8IG9sZHZhbCA8PCBlbmRsOw0KICAg
IGNvdXQgPDwgIk5ldyB2YWx1ZSA9ICIgPDwgbmV3dmFsIDw8IGVuZGw7DQog
IH0NCiAgZWxzZSB7DQogICAgY2VyciA8PCAiRXJyb3IgX3N5c2N0bCgpIiA8
PCBlbmRsDQoJIDw8ICJlcnJubyA9ICIgPDwgZXJybm8gPDwgIiA6ICIgPDwg
c3RyZXJyb3IoIGVycm5vICkgPDwgZW5kbDsNCiAgfQ0KDQogIHJldHVybigg
MCApOw0KfQ0K
--494976478-1517374193-924297811=:4312--

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu