Mail Archives: cygwin/2001/09/27/05:16:36
--1837512633-1488857505-1001582120=:23288
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hi,
On Win95, the implementation of SIOCGIFCONF seems to be wrong. For Win95a
it seems to work, but Win95b and Win95c will onyl return the loopback
device. Searching through the code, I found the reason in winsup/cygwin/net.c
in get_95_ifconf, the registry is searched for the key HKLM/Enum/MSTCP/*
which seems to represent the TCP/IP configurations. The current
implementaion then searches for each entry the keys in Bindings, which
represent bindings to services as Client for Windows Networks or File
sharing. One of these keys is taken as reference to HKLM/System/
CurrentControlSet/Services/Class/Net/* where the network adapter is store.
This seems to work on Win95a, but does often fail on Win95c. The binding to
a service has IMO nothing to do with the binding to a NIC, so the connection
to the NIC is stored in another way. Since there is a 1-to-1 relation between
network cards and TCP configuration, no extra binding needs to be stored.
The name for the adapter in HKLM/CurrentControlSet/.../Net is the same as
the key in HKLM/Enum/Net/*.
I modified the function in net.c and the correct number of interfaces is
reported for win95a and win95c.
I attached the patch. A patch cygwin1.dll is available at
<http://www.tu-chemnitz.de/~goal/xfree/cygwin1.fixed-netdev.dll.bz2>
bye
ago
Please keep me CCed or CC to cygwin-xfree
--
Alexander DOT Gottwald AT informatik DOT tu-chemnitz DOT de
http://www.gotti.org ICQ: 126018723
phone: +49 3725 349 80 80 mobile: +49 172 7854017
--1837512633-1488857505-1001582120=:23288
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="cygwin.fixed-netdev.diff"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine DOT LNX DOT 4 DOT 21 DOT 0109271115200 DOT 23288 AT rotuma DOT informatik DOT tu-chemnitz DOT de>
Content-Description:
Content-Disposition: attachment; filename="cygwin.fixed-netdev.diff"
LS0tIGN5Z3dpbi0xLjMuMy0yL3dpbnN1cC9jeWd3aW4vbmV0LmNjCVdlZCBT
ZXAgMTIgMDc6MzE6NTYgMjAwMQ0KKysrIGN5Z3dpbi1uZXcvd2luc3VwL2N5
Z3dpbi9uZXQuY2MJV2VkIF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HJvbFNldFxcU2VydmljZXNcXENsYXNzXFxOZXRcXCIpOw0KKyAgICAg
IHN0cmNhdCAobmV0bmFtZSwgaWZuYW1lKTsNCiANCisgICAgICBpZiAoUmVn
T3BlbktleUV4IChIS0VZX0xPQ0FMX01BQ0hJTkUsIG5ldG5hbWUsDQorICAg
ICAgICAgICAgICAgICAgMCwgS0VZX1JFQUQsICZzdWJrZXkpICE9IEVSUk9S
X1NVQ0NFU1MpDQorICAgICAgew0KKyAgICAgICAgICBSZWdDbG9zZUtleSAo
aWZrZXkpOw0KKyAgICAgICAgICAtLWlmcjsNCisgICAgICAgICAgY29udGlu
dWU7DQorICAgICAgfQ0KKw0KKyAgICAgIGlmIChSZWdRdWVyeVZhbHVlRXgg
KHN1YmtleSwgIkFkYXB0ZXJOYW1lIiwgMCwNCisgICAgICAgICAgICAgICAg
ICBOVUxMLCAodW5zaWduZWQgY2hhciAqKSBhZGFwdGVyLA0KKyAgICAgICAg
ICAgICAgICAgIChzaXplID0gc2l6ZW9mIGFkYXB0ZXIsICZzaXplKSkgPT0g
RVJST1JfU1VDQ0VTUw0KKyAgICAgICAgICAgICAgJiYgc3RyY2FzZW1hdGNo
IChhZGFwdGVyLCAiTVMkUFBQIikpDQorICAgICAgew0KKyAgICAgICAgICAr
KypwcHA7DQorICAgICAgICAgIHN0cmNweSAoaWZyLT5pZnJfbmFtZSwgInBw
cCIpOw0KKyAgICAgICAgICBzdHJjYXQgKGlmci0+aWZyX25hbWUsIHBwcCk7
DQorICAgICAgfQ0KKyAgICAgIGVsc2UNCisgICAgICB7DQorICAgICAgICAg
ICsrKmV0aDsNCisgICAgICAgICAgc3RyY3B5IChpZnItPmlmcl9uYW1lLCAi
ZXRoIik7DQorICAgICAgICAgIHN0cmNhdCAoaWZyLT5pZnJfbmFtZSwgZXRo
KTsNCisgICAgICB9DQorICAgICAgDQogICAgICAgUmVnQ2xvc2VLZXkgKHN1
YmtleSk7DQotDQotICAgICAgaWYgKHJlcyA9PSBFUlJPU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gIFJlZ0Nsb3NlS2V5IChp
ZmtleSk7DQogDQogICAgICAgKytjbnQ7DQo=
--1837512633-1488857505-1001582120=:23288
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
--1837512633-1488857505-1001582120=:23288--
- Raw text -