linux-decnet-user Mailing List for DECnet for Linux
Brought to you by:
chrissie_c,
ph3-der-loewe
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(8) |
Jun
(39) |
Jul
(30) |
Aug
(23) |
Sep
(9) |
Oct
(9) |
Nov
(30) |
Dec
(24) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(12) |
Feb
(4) |
Mar
(21) |
Apr
|
May
(3) |
Jun
(3) |
Jul
(13) |
Aug
(13) |
Sep
(18) |
Oct
(10) |
Nov
(25) |
Dec
(2) |
| 2002 |
Jan
(7) |
Feb
(14) |
Mar
(15) |
Apr
(29) |
May
(10) |
Jun
(23) |
Jul
(76) |
Aug
(52) |
Sep
(15) |
Oct
(47) |
Nov
(12) |
Dec
(1) |
| 2003 |
Jan
(5) |
Feb
(12) |
Mar
(21) |
Apr
(26) |
May
(66) |
Jun
(16) |
Jul
(13) |
Aug
(7) |
Sep
(21) |
Oct
(11) |
Nov
(4) |
Dec
(11) |
| 2004 |
Jan
(18) |
Feb
(1) |
Mar
(1) |
Apr
(20) |
May
(10) |
Jun
(4) |
Jul
(9) |
Aug
(9) |
Sep
|
Oct
(5) |
Nov
(13) |
Dec
(8) |
| 2005 |
Jan
(23) |
Feb
(2) |
Mar
(1) |
Apr
|
May
(11) |
Jun
(3) |
Jul
(5) |
Aug
(15) |
Sep
(3) |
Oct
(13) |
Nov
(2) |
Dec
(7) |
| 2006 |
Jan
(5) |
Feb
(8) |
Mar
(6) |
Apr
(6) |
May
|
Jun
|
Jul
(1) |
Aug
(5) |
Sep
(2) |
Oct
(6) |
Nov
|
Dec
(3) |
| 2007 |
Jan
|
Feb
(6) |
Mar
(3) |
Apr
(1) |
May
|
Jun
(5) |
Jul
(7) |
Aug
|
Sep
(7) |
Oct
(7) |
Nov
(4) |
Dec
(2) |
| 2008 |
Jan
(10) |
Feb
(5) |
Mar
(2) |
Apr
(2) |
May
|
Jun
|
Jul
(14) |
Aug
(3) |
Sep
(6) |
Oct
(7) |
Nov
|
Dec
|
| 2009 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
(2) |
May
(2) |
Jun
(1) |
Jul
(3) |
Aug
(15) |
Sep
(9) |
Oct
(1) |
Nov
(2) |
Dec
|
| 2010 |
Jan
|
Feb
(5) |
Mar
(2) |
Apr
|
May
(3) |
Jun
|
Jul
(5) |
Aug
(2) |
Sep
(6) |
Oct
(1) |
Nov
(15) |
Dec
|
| 2011 |
Jan
(4) |
Feb
(1) |
Mar
(11) |
Apr
|
May
|
Jun
(17) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(8) |
| 2012 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
(8) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
(12) |
Feb
(15) |
Mar
(11) |
Apr
(1) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
(5) |
Jul
(1) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
| 2016 |
Jan
|
Feb
(14) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
(3) |
Dec
|
| 2018 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
(1) |
2
|
3
|
|
4
|
5
|
6
|
7
(3) |
8
(5) |
9
|
10
(3) |
|
11
|
12
|
13
|
14
|
15
|
16
|
17
|
|
18
(2) |
19
(4) |
20
(6) |
21
|
22
|
23
|
24
|
|
25
|
26
|
27
|
28
|
29
(1) |
30
|
|
|
From: David S. M. <da...@re...> - 2001-11-29 07:39:39
|
From: Steven Whitehouse <st...@gw...> Date: Tue, 20 Nov 2001 10:24:54 +0000 (GMT) Please queue for the next 2.4 kernel patch, Applied, I'll push this upstream soon. |
|
From: Patrick C. <pa...@ty...> - 2001-11-20 18:39:38
|
Something I've been meaning to do for ages was to write a MOP/CCP client for Linux so I could manage my (ever increasing number of*) terminal servers from Linux as well as VMS. Well I just did and it only took an hour - quite why I waited so long now I'm not sure now! Anyway, if this might be useful to you then it's checked into CVS with latd under tag TAG_LATD_1_10 and it's called moprc. If you try it please let me know how you get on. Basic usage is moprc -i<interface> <ethernet address> eg: moprc -ieth1 08-00-2B-0A-9D-59 More functionality, including a man page and usage message, to follow. patrick *Thanks Rob |
|
From: Steven W. <st...@gw...> - 2001-11-20 11:45:31
|
Hi, [snip] > > OK, will this new code be folded into an official release of 2.4.x or > 2.5.y ? > > -HWM > This is a bug fix, so it should go into 2.4 (with luck :-) Steve. |
|
From: Henry W. M. <hen...@at...> - 2001-11-20 11:35:14
|
----- Original Message ----- From: "Steven Whitehouse" <st...@gw...> To: "Patrick Caulfield" <pa...@ty...> Cc: <lin...@li...> Sent: Tuesday, November 20, 2001 02:01 Subject: Re: [Linux-decnet-user] Patch to 2.4.15-pre5 to fix local port alloc bug > Hi, > > Ok. I'll fix the URL and forward to Dave Miller in that case. Then I can > start working on part two of the patch, > > Steve. > > > > > On Mon, Nov 19, 2001 at 10:39:11PM +0000, Steven Whitehouse wrote: > > > Hi, > > > > > > Here is my second attempt at the patch... hopefully binding to the wild card > > > object is now working again, > > > > > > > That seems to work now. BTW the sourceforge status page URL is actually > > > > http://sourceforge.net/projects/linux-decnet/ (not not just "/decnet/") > > > > patrick > > > > OK, will this new code be folded into an official release of 2.4.x or 2.5.y ? -HWM > > _______________________________________________ > > Linux-decnet-user mailing list > > Lin...@li... > > https://lists.sourceforge.net/lists/listinfo/linux-decnet-user > > > > > _______________________________________________ > Linux-decnet-user mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linux-decnet-user > |
|
From: Steven W. <st...@gw...> - 2001-11-20 10:27:44
|
Hi,
Here is a patch which fixes a bug with local port allocation. Its been tested
and appears to work ok. I'm quite keen to get this patch in as the bug is
a fairly important one to get fixed. Eventually there will be a part two of
this patch which will fix dn_accept() (see the FIXME I added in this patch).
For the time being though I'd rather get the original bug fixed and I prefer to
do the fixes in small chuncks rather than all at once.
Also included are a few doc updates.
Please queue for the next 2.4 kernel patch,
Thanks,
Steve.
------------------------------------------------------------------------------
diff -Nru linux-2.4.15-pre5/Documentation/networking/decnet.txt linux/Documentation/networking/decnet.txt
--- linux-2.4.15-pre5/Documentation/networking/decnet.txt Sun Mar 11 21:33:27 2001
+++ linux/Documentation/networking/decnet.txt Tue Nov 20 11:45:25 2001
@@ -4,20 +4,9 @@
1) Other documentation....
o Project Home Pages
- http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html - Kernel info
+ http://www.chygwyn.com/DECnet/ - Kernel info
http://linux-decnet.sourceforge.net/ - Userland tools
-
- o FTP sites
- ftp://ftp.sucs.swan.ac.uk/pub/Linux/DECnet/
- - Swansea University Computer Society DECnet Archive
- (contains kernel patches and info)
- - Mirror of userland tools on ftp.dreamtime.org
- - Mirror of Alexey Kuznetsov's iproute2 package and
- other utilities
-
- ftp://linux-decnet.sourceforge.net/pub/linux-decnet/
- - Patrick Caulfield's archive of userland tools and
- Eduardo Serrat's kernel patches
+ http://www.sourceforge.net/projects/linux-decnet/ - Status page
2) Configuring the kernel
@@ -34,6 +23,12 @@
CONFIG_NETLINK (to allow rtnetlink)
CONFIG_RTNETLINK (for communication with the kernel routing layer)
CONFIG_NETFILTER (will be required for the DECnet routing daemon)
+
+ CONFIG_DECNET_ROUTE_FWMARK is optional
+
+Don't turn on SIOCGIFCONF support for DECnet unless you are really sure
+that you need it, in general you won't and it can cause ifconfig to
+malfunction.
3) Command line options
diff -Nru linux-2.4.15-pre5/net/decnet/README linux/net/decnet/README
--- linux-2.4.15-pre5/net/decnet/README Wed May 26 17:36:36 1999
+++ linux/net/decnet/README Sat Nov 17 20:07:21 2001
@@ -3,6 +3,6 @@
The documentation for this kernel subsystem is available in the
Documentation/networking subdirctory of this distribution and also
-on line at http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html.
+on line at http://www.chygwyn.com/DECnet/
Steve Whitehouse <St...@AC...>
diff -Nru linux-2.4.15-pre5/net/decnet/af_decnet.c linux/net/decnet/af_decnet.c
--- linux-2.4.15-pre5/net/decnet/af_decnet.c Sat Nov 17 18:03:34 2001
+++ linux/net/decnet/af_decnet.c Mon Nov 19 19:01:16 2001
@@ -36,6 +36,7 @@
* Steve Whitehouse: Removed unused code. Fix to use sk->allocation
* when required.
* Patrick Caulfield: /proc/net/decnet now has object name/number
+ * Steve Whitehouse: Fixed local port allocation, hashed sk list
*/
@@ -139,9 +140,13 @@
dn_address decnet_address = 0;
unsigned char decnet_ether_address[ETH_ALEN] = { 0xAA, 0x00, 0x04, 0x00, 0x00, 0x00 };
+#define DN_SK_HASH_SHIFT 8
+#define DN_SK_HASH_SIZE (1 << DN_SK_HASH_SHIFT)
+#define DN_SK_HASH_MASK (DN_SK_HASH_SIZE - 1)
+
static struct proto_ops dn_proto_ops;
rwlock_t dn_hash_lock = RW_LOCK_UNLOCKED;
-static struct sock *dn_sklist;
+static struct sock *dn_sk_hash[DN_SK_HASH_SIZE];
static struct sock *dn_wild_sk;
static int __dn_setsockopt(struct socket *sock, int level, int optname, char *optval, int optlen, int flags);
@@ -154,18 +159,38 @@
if (scp->addr.sdn_flags & SDF_WILD)
return dn_wild_sk ? NULL : &dn_wild_sk;
- return &dn_sklist;
+ return &dn_sk_hash[scp->addrloc & DN_SK_HASH_MASK];
+}
+
+/*
+ * Valid ports are those greater than zero and not already in use.
+ */
+static int check_port(unsigned short port)
+{
+ struct sock *sk = dn_sk_hash[port & DN_SK_HASH_MASK];
+ if (port == 0)
+ return -1;
+ while(sk) {
+ struct dn_scp *scp = DN_SK(sk);
+ if (scp->addrloc == port)
+ return -1;
+ sk = sk->next;
+ }
+ return 0;
}
static unsigned short port_alloc(struct sock *sk)
{
struct dn_scp *scp = DN_SK(sk);
static unsigned short port = 0x2000;
+ unsigned short i_port = port;
- if (port == 0)
- port++;
+ while(check_port(++port) != 0) {
+ if (port == i_port)
+ return 0;
+ }
- scp->addrloc = port++;
+ scp->addrloc = port;
return 1;
}
@@ -238,6 +263,48 @@
sk->pprev = NULL;
}
+struct sock **listen_hash(struct sockaddr_dn *addr)
+{
+ int i;
+ unsigned hash = addr->sdn_objnum;
+
+ if (hash == 0) {
+ hash = addr->sdn_objnamel;
+ for(i = 0; i < addr->sdn_objnamel; i++) {
+ hash ^= addr->sdn_objname[i];
+ hash ^= (hash << 3);
+ }
+ }
+
+ return &dn_sk_hash[hash & DN_SK_HASH_MASK];
+}
+
+/*
+ * Called to transform a socket from bound (i.e. with a local address)
+ * into a listening socket (doesn't need a local port number) and rehashes
+ * based upon the object name/number.
+ */
+static void dn_rehash_sock(struct sock *sk)
+{
+ struct sock **skp = sk->pprev;
+ struct dn_scp *scp = DN_SK(sk);
+
+ if (scp->addr.sdn_flags & SDF_WILD)
+ return;
+
+ write_lock_bh(&dn_hash_lock);
+ while(*skp != sk)
+ skp = &((*skp)->next);
+ *skp = sk->next;
+
+ DN_SK(sk)->addrloc = 0;
+ skp = listen_hash(&DN_SK(sk)->addr);
+
+ sk->next = *skp;
+ sk->pprev = skp;
+ *skp = sk;
+ write_unlock_bh(&dn_hash_lock);
+}
int dn_sockaddr2username(struct sockaddr_dn *sdn, unsigned char *buf, unsigned char type)
{
@@ -328,10 +395,11 @@
struct sock *dn_sklist_find_listener(struct sockaddr_dn *addr)
{
+ struct sock **skp = listen_hash(addr);
struct sock *sk;
read_lock(&dn_hash_lock);
- for(sk = dn_sklist; sk != NULL; sk = sk->next) {
+ for(sk = *skp; sk != NULL; sk = sk->next) {
struct dn_scp *scp = DN_SK(sk);
if (sk->state != TCP_LISTEN)
continue;
@@ -365,7 +433,8 @@
struct dn_scp *scp;
read_lock(&dn_hash_lock);
- for(sk = dn_sklist; sk != NULL; sk = sk->next) {
+ sk = dn_sk_hash[cb->dst_port & DN_SK_HASH_MASK];
+ for (; sk != NULL; sk = sk->next) {
scp = DN_SK(sk);
if (cb->src != dn_saddr2dn(&scp->peer))
continue;
@@ -1045,6 +1114,9 @@
sizeof(struct optdata_dn));
lock_sock(newsk);
+ /*
+ * FIXME: This can fail if we've run out of local ports....
+ */
dn_hash_sock(newsk);
dn_send_conn_ack(newsk);
@@ -1200,6 +1272,7 @@
sk->ack_backlog = 0;
sk->state = TCP_LISTEN;
err = 0;
+ dn_rehash_sock(sk);
out:
release_sock(sk);
@@ -2063,44 +2136,47 @@
char buf2[DN_ASCBUF_LEN];
char local_object[DN_MAXOBJL+3];
char remote_object[DN_MAXOBJL+3];
+ int i;
len += sprintf(buffer + len, "Local Remote\n");
read_lock(&dn_hash_lock);
- for(sk = dn_sklist; sk != NULL; sk = sk->next) {
- scp = DN_SK(sk);
-
- dn_printable_object(&scp->addr, local_object);
- dn_printable_object(&scp->peer, remote_object);
-
- len += sprintf(buffer + len,
- "%6s/%04X %04d:%04d %04d:%04d %01d %-16s %6s/%04X %04d:%04d %04d:%04d %01d %-16s %4s %s\n",
- dn_addr2asc(dn_ntohs(dn_saddr2dn(&scp->addr)), buf1),
- scp->addrloc,
- scp->numdat,
- scp->numoth,
- scp->ackxmt_dat,
- scp->ackxmt_oth,
- scp->flowloc_sw,
- local_object,
- dn_addr2asc(dn_ntohs(dn_saddr2dn(&scp->peer)), buf2),
- scp->addrrem,
- scp->numdat_rcv,
- scp->numoth_rcv,
- scp->ackrcv_dat,
- scp->ackrcv_oth,
- scp->flowrem_sw,
- remote_object,
- dn_state2asc(scp->state),
- ((scp->accept_mode == ACC_IMMED) ? "IMMED" : "DEFER"));
-
- pos = begin + len;
- if (pos < offset) {
- len = 0;
- begin = pos;
+ for(i = 0; i < DN_SK_HASH_SIZE; i++) {
+ for(sk = dn_sk_hash[i]; sk != NULL; sk = sk->next) {
+ scp = DN_SK(sk);
+
+ dn_printable_object(&scp->addr, local_object);
+ dn_printable_object(&scp->peer, remote_object);
+
+ len += sprintf(buffer + len,
+ "%6s/%04X %04d:%04d %04d:%04d %01d %-16s %6s/%04X %04d:%04d %04d:%04d %01d %-16s %4s %s\n",
+ dn_addr2asc(dn_ntohs(dn_saddr2dn(&scp->addr)), buf1),
+ scp->addrloc,
+ scp->numdat,
+ scp->numoth,
+ scp->ackxmt_dat,
+ scp->ackxmt_oth,
+ scp->flowloc_sw,
+ local_object,
+ dn_addr2asc(dn_ntohs(dn_saddr2dn(&scp->peer)), buf2),
+ scp->addrrem,
+ scp->numdat_rcv,
+ scp->numoth_rcv,
+ scp->ackrcv_dat,
+ scp->ackrcv_oth,
+ scp->flowrem_sw,
+ remote_object,
+ dn_state2asc(scp->state),
+ ((scp->accept_mode == ACC_IMMED) ? "IMMED" : "DEFER"));
+
+ pos = begin + len;
+ if (pos < offset) {
+ len = 0;
+ begin = pos;
+ }
+ if (pos > (offset + length))
+ break;
}
- if (pos > (offset + length))
- break;
}
read_unlock(&dn_hash_lock);
@@ -2158,7 +2234,7 @@
MODULE_PARM_DESC(addr, "The DECnet address of this machine: area,node");
#endif
-static char banner[] __initdata = KERN_INFO "NET4: DECnet for Linux: V.2.4.9s (C) 1995-2001 Linux DECnet Project Team\n";
+static char banner[] __initdata = KERN_INFO "NET4: DECnet for Linux: V.2.4.15-pre5s (C) 1995-2001 Linux DECnet Project Team\n";
static int __init decnet_init(void)
{
|
|
From: Steven W. <st...@gw...> - 2001-11-20 10:04:05
|
Hi, Ok. I'll fix the URL and forward to Dave Miller in that case. Then I can start working on part two of the patch, Steve. > > On Mon, Nov 19, 2001 at 10:39:11PM +0000, Steven Whitehouse wrote: > > Hi, > > > > Here is my second attempt at the patch... hopefully binding to the wild card > > object is now working again, > > > > That seems to work now. BTW the sourceforge status page URL is actually > > http://sourceforge.net/projects/linux-decnet/ (not not just "/decnet/") > > patrick > > > _______________________________________________ > Linux-decnet-user mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linux-decnet-user > |
|
From: Patrick C. <pa...@ty...> - 2001-11-20 10:00:20
|
On Mon, Nov 19, 2001 at 10:39:11PM +0000, Steven Whitehouse wrote: > Hi, > > Here is my second attempt at the patch... hopefully binding to the wild card > object is now working again, > That seems to work now. BTW the sourceforge status page URL is actually http://sourceforge.net/projects/linux-decnet/ (not not just "/decnet/") patrick |
|
From: Steven W. <st...@gw...> - 2001-11-19 22:42:04
|
Hi,
Here is my second attempt at the patch... hopefully binding to the wild card
object is now working again,
Steve.
------------------------------------------------------------------------------
diff -Nru linux-2.4.15-pre5/Documentation/networking/decnet.txt linux/Documentation/networking/decnet.txt
--- linux-2.4.15-pre5/Documentation/networking/decnet.txt Sun Mar 11 21:33:27 2001
+++ linux/Documentation/networking/decnet.txt Mon Nov 19 21:06:50 2001
@@ -4,20 +4,9 @@
1) Other documentation....
o Project Home Pages
- http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html - Kernel info
+ http://www.chygwyn.com/DECnet/ - Kernel info
http://linux-decnet.sourceforge.net/ - Userland tools
-
- o FTP sites
- ftp://ftp.sucs.swan.ac.uk/pub/Linux/DECnet/
- - Swansea University Computer Society DECnet Archive
- (contains kernel patches and info)
- - Mirror of userland tools on ftp.dreamtime.org
- - Mirror of Alexey Kuznetsov's iproute2 package and
- other utilities
-
- ftp://linux-decnet.sourceforge.net/pub/linux-decnet/
- - Patrick Caulfield's archive of userland tools and
- Eduardo Serrat's kernel patches
+ http://www.sourceforge.net/projects/decnet/ - Status page
2) Configuring the kernel
@@ -34,6 +23,12 @@
CONFIG_NETLINK (to allow rtnetlink)
CONFIG_RTNETLINK (for communication with the kernel routing layer)
CONFIG_NETFILTER (will be required for the DECnet routing daemon)
+
+ CONFIG_DECNET_ROUTE_FWMARK is optional
+
+Don't turn on SIOCGIFCONF support for DECnet unless you are really sure
+that you need it, in general you won't and it can cause ifconfig to
+malfunction.
3) Command line options
diff -Nru linux-2.4.15-pre5/net/decnet/README linux/net/decnet/README
--- linux-2.4.15-pre5/net/decnet/README Wed May 26 17:36:36 1999
+++ linux/net/decnet/README Sat Nov 17 20:07:21 2001
@@ -3,6 +3,6 @@
The documentation for this kernel subsystem is available in the
Documentation/networking subdirctory of this distribution and also
-on line at http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html.
+on line at http://www.chygwyn.com/DECnet/
Steve Whitehouse <St...@AC...>
diff -Nru linux-2.4.15-pre5/net/decnet/af_decnet.c linux/net/decnet/af_decnet.c
--- linux-2.4.15-pre5/net/decnet/af_decnet.c Sat Nov 17 18:03:34 2001
+++ linux/net/decnet/af_decnet.c Mon Nov 19 19:01:16 2001
@@ -36,6 +36,7 @@
* Steve Whitehouse: Removed unused code. Fix to use sk->allocation
* when required.
* Patrick Caulfield: /proc/net/decnet now has object name/number
+ * Steve Whitehouse: Fixed local port allocation, hashed sk list
*/
@@ -139,9 +140,13 @@
dn_address decnet_address = 0;
unsigned char decnet_ether_address[ETH_ALEN] = { 0xAA, 0x00, 0x04, 0x00, 0x00, 0x00 };
+#define DN_SK_HASH_SHIFT 8
+#define DN_SK_HASH_SIZE (1 << DN_SK_HASH_SHIFT)
+#define DN_SK_HASH_MASK (DN_SK_HASH_SIZE - 1)
+
static struct proto_ops dn_proto_ops;
rwlock_t dn_hash_lock = RW_LOCK_UNLOCKED;
-static struct sock *dn_sklist;
+static struct sock *dn_sk_hash[DN_SK_HASH_SIZE];
static struct sock *dn_wild_sk;
static int __dn_setsockopt(struct socket *sock, int level, int optname, char *optval, int optlen, int flags);
@@ -154,18 +159,38 @@
if (scp->addr.sdn_flags & SDF_WILD)
return dn_wild_sk ? NULL : &dn_wild_sk;
- return &dn_sklist;
+ return &dn_sk_hash[scp->addrloc & DN_SK_HASH_MASK];
+}
+
+/*
+ * Valid ports are those greater than zero and not already in use.
+ */
+static int check_port(unsigned short port)
+{
+ struct sock *sk = dn_sk_hash[port & DN_SK_HASH_MASK];
+ if (port == 0)
+ return -1;
+ while(sk) {
+ struct dn_scp *scp = DN_SK(sk);
+ if (scp->addrloc == port)
+ return -1;
+ sk = sk->next;
+ }
+ return 0;
}
static unsigned short port_alloc(struct sock *sk)
{
struct dn_scp *scp = DN_SK(sk);
static unsigned short port = 0x2000;
+ unsigned short i_port = port;
- if (port == 0)
- port++;
+ while(check_port(++port) != 0) {
+ if (port == i_port)
+ return 0;
+ }
- scp->addrloc = port++;
+ scp->addrloc = port;
return 1;
}
@@ -238,6 +263,48 @@
sk->pprev = NULL;
}
+struct sock **listen_hash(struct sockaddr_dn *addr)
+{
+ int i;
+ unsigned hash = addr->sdn_objnum;
+
+ if (hash == 0) {
+ hash = addr->sdn_objnamel;
+ for(i = 0; i < addr->sdn_objnamel; i++) {
+ hash ^= addr->sdn_objname[i];
+ hash ^= (hash << 3);
+ }
+ }
+
+ return &dn_sk_hash[hash & DN_SK_HASH_MASK];
+}
+
+/*
+ * Called to transform a socket from bound (i.e. with a local address)
+ * into a listening socket (doesn't need a local port number) and rehashes
+ * based upon the object name/number.
+ */
+static void dn_rehash_sock(struct sock *sk)
+{
+ struct sock **skp = sk->pprev;
+ struct dn_scp *scp = DN_SK(sk);
+
+ if (scp->addr.sdn_flags & SDF_WILD)
+ return;
+
+ write_lock_bh(&dn_hash_lock);
+ while(*skp != sk)
+ skp = &((*skp)->next);
+ *skp = sk->next;
+
+ DN_SK(sk)->addrloc = 0;
+ skp = listen_hash(&DN_SK(sk)->addr);
+
+ sk->next = *skp;
+ sk->pprev = skp;
+ *skp = sk;
+ write_unlock_bh(&dn_hash_lock);
+}
int dn_sockaddr2username(struct sockaddr_dn *sdn, unsigned char *buf, unsigned char type)
{
@@ -328,10 +395,11 @@
struct sock *dn_sklist_find_listener(struct sockaddr_dn *addr)
{
+ struct sock **skp = listen_hash(addr);
struct sock *sk;
read_lock(&dn_hash_lock);
- for(sk = dn_sklist; sk != NULL; sk = sk->next) {
+ for(sk = *skp; sk != NULL; sk = sk->next) {
struct dn_scp *scp = DN_SK(sk);
if (sk->state != TCP_LISTEN)
continue;
@@ -365,7 +433,8 @@
struct dn_scp *scp;
read_lock(&dn_hash_lock);
- for(sk = dn_sklist; sk != NULL; sk = sk->next) {
+ sk = dn_sk_hash[cb->dst_port & DN_SK_HASH_MASK];
+ for (; sk != NULL; sk = sk->next) {
scp = DN_SK(sk);
if (cb->src != dn_saddr2dn(&scp->peer))
continue;
@@ -1045,6 +1114,9 @@
sizeof(struct optdata_dn));
lock_sock(newsk);
+ /*
+ * FIXME: This can fail if we've run out of local ports....
+ */
dn_hash_sock(newsk);
dn_send_conn_ack(newsk);
@@ -1200,6 +1272,7 @@
sk->ack_backlog = 0;
sk->state = TCP_LISTEN;
err = 0;
+ dn_rehash_sock(sk);
out:
release_sock(sk);
@@ -2063,44 +2136,47 @@
char buf2[DN_ASCBUF_LEN];
char local_object[DN_MAXOBJL+3];
char remote_object[DN_MAXOBJL+3];
+ int i;
len += sprintf(buffer + len, "Local Remote\n");
read_lock(&dn_hash_lock);
- for(sk = dn_sklist; sk != NULL; sk = sk->next) {
- scp = DN_SK(sk);
-
- dn_printable_object(&scp->addr, local_object);
- dn_printable_object(&scp->peer, remote_object);
-
- len += sprintf(buffer + len,
- "%6s/%04X %04d:%04d %04d:%04d %01d %-16s %6s/%04X %04d:%04d %04d:%04d %01d %-16s %4s %s\n",
- dn_addr2asc(dn_ntohs(dn_saddr2dn(&scp->addr)), buf1),
- scp->addrloc,
- scp->numdat,
- scp->numoth,
- scp->ackxmt_dat,
- scp->ackxmt_oth,
- scp->flowloc_sw,
- local_object,
- dn_addr2asc(dn_ntohs(dn_saddr2dn(&scp->peer)), buf2),
- scp->addrrem,
- scp->numdat_rcv,
- scp->numoth_rcv,
- scp->ackrcv_dat,
- scp->ackrcv_oth,
- scp->flowrem_sw,
- remote_object,
- dn_state2asc(scp->state),
- ((scp->accept_mode == ACC_IMMED) ? "IMMED" : "DEFER"));
-
- pos = begin + len;
- if (pos < offset) {
- len = 0;
- begin = pos;
+ for(i = 0; i < DN_SK_HASH_SIZE; i++) {
+ for(sk = dn_sk_hash[i]; sk != NULL; sk = sk->next) {
+ scp = DN_SK(sk);
+
+ dn_printable_object(&scp->addr, local_object);
+ dn_printable_object(&scp->peer, remote_object);
+
+ len += sprintf(buffer + len,
+ "%6s/%04X %04d:%04d %04d:%04d %01d %-16s %6s/%04X %04d:%04d %04d:%04d %01d %-16s %4s %s\n",
+ dn_addr2asc(dn_ntohs(dn_saddr2dn(&scp->addr)), buf1),
+ scp->addrloc,
+ scp->numdat,
+ scp->numoth,
+ scp->ackxmt_dat,
+ scp->ackxmt_oth,
+ scp->flowloc_sw,
+ local_object,
+ dn_addr2asc(dn_ntohs(dn_saddr2dn(&scp->peer)), buf2),
+ scp->addrrem,
+ scp->numdat_rcv,
+ scp->numoth_rcv,
+ scp->ackrcv_dat,
+ scp->ackrcv_oth,
+ scp->flowrem_sw,
+ remote_object,
+ dn_state2asc(scp->state),
+ ((scp->accept_mode == ACC_IMMED) ? "IMMED" : "DEFER"));
+
+ pos = begin + len;
+ if (pos < offset) {
+ len = 0;
+ begin = pos;
+ }
+ if (pos > (offset + length))
+ break;
}
- if (pos > (offset + length))
- break;
}
read_unlock(&dn_hash_lock);
@@ -2158,7 +2234,7 @@
MODULE_PARM_DESC(addr, "The DECnet address of this machine: area,node");
#endif
-static char banner[] __initdata = KERN_INFO "NET4: DECnet for Linux: V.2.4.9s (C) 1995-2001 Linux DECnet Project Team\n";
+static char banner[] __initdata = KERN_INFO "NET4: DECnet for Linux: V.2.4.15-pre5s (C) 1995-2001 Linux DECnet Project Team\n";
static int __init decnet_init(void)
{
|
|
From: Steven W. <st...@gw...> - 2001-11-19 14:39:02
|
Hi, I wondered about the TIME_WAIT state.... in fact the Linux DECnet code has such a thing (rather crude but works I think) as I added it to avoid those problems. After we spoke about the hashing at the storage management conference last year I started writing a new set of hashing code based upon what you'd said to me there. It started looking rather ugly, so I made the decision to use much simpler code to fix the bugs in 2.4 and then to look again at the more complex, but less limiting code in 2.5. The idea of adding some bits as a counter to avoid TIME_WAIT seems interesting but I wonder if we could come up with a better one... for example if we timed how long it takes for the local port counter (in dn_alloc_port()) to wrap around ? We could insert an extra delay in the case that it was rotating too fast. Easy to do since we only ever allocate local ports from user context. For a more advanced version, that could be done on a per remote-node basis. Perhaps we need a peer cache, like the ipv4 code .... ? The entries would contain the local port counter for that remote node and they would only need to stay around for the TIME_WAIT period. At least then we'd only need to keep the small cache entry around and not a bunch of sockets, Steve. > > Excerpt of message (sent 18 November 2001) by Steven Whitehouse: > > ... > > Also, please note that this code > > limits the maximum number of DECnet sockets (system wide) to 0xffff - 1. There > > isn't really any need for this limit because if you take the local and remote > > DECnet addresses into account during socket demultiplexing then you should be > > able to have 0xffff - 1 connections to each remote node. > > The global limit is typical of DECnet implementations. The connection > identifying approach used in NSP (two identifiers, each picked by one > endpoint) was chosen specifically so each end could simply use that > identifier as an index into a vector of connection pointers. (More > commonly, some of the bits are index and the rest are a serial number, > to distinguish old connections from new ones -- so NSP doesn't need > the TIME_WAIT state as TCP does.) The result is (a) very easy > connection lookup for inbound traffic, (b) a global limit on > connections rather than a per remote host limit. For the era when > DECnet (phase 2, actually) was designed, that was a fine tradeoff, and > it wasn't revisited either for phase 3 or phase 4. > > paul > |
|
From: Paul K. <pk...@eq...> - 2001-11-19 14:11:48
|
Excerpt of message (sent 18 November 2001) by Steven Whitehouse:
> ...
> Also, please note that this code
> limits the maximum number of DECnet sockets (system wide) to 0xffff - 1. There
> isn't really any need for this limit because if you take the local and remote
> DECnet addresses into account during socket demultiplexing then you should be
> able to have 0xffff - 1 connections to each remote node.
The global limit is typical of DECnet implementations. The connection
identifying approach used in NSP (two identifiers, each picked by one
endpoint) was chosen specifically so each end could simply use that
identifier as an index into a vector of connection pointers. (More
commonly, some of the bits are index and the rest are a serial number,
to distinguish old connections from new ones -- so NSP doesn't need
the TIME_WAIT state as TCP does.) The result is (a) very easy
connection lookup for inbound traffic, (b) a global limit on
connections rather than a per remote host limit. For the era when
DECnet (phase 2, actually) was designed, that was a fine tradeoff, and
it wasn't revisited either for phase 3 or phase 4.
paul
|
|
From: Steven W. <st...@gw...> - 2001-11-19 09:51:01
|
Hi, [snip] > > The ftp site at sourceforge is dead. All the files (including the Xservers) > should now be available via http. This is sourceforge's decision and I'm not > happy with it but there you are. > > I have no immediate plans to vacate sourceforge despite what is happening at VA > Linux and Loic Dachary's article on Advogato. > > patrick > > I'll try and remember to do that next time. Once this patch is tested and in I'll be working straight away on the next stage which is to send the correct response when we are out of local ports and dn_accept() tries to create another socket. I have a few other little tidy-up patches to add to that as well, Steve. |
|
From: Patrick C. <pa...@ty...> - 2001-11-18 19:43:15
|
On Sun, Nov 18, 2001 at 02:11:37PM +0000, Steven Whitehouse wrote: > Hi, > > Here is a patch with the following features: > > 1. Fixes local port allocation bug (we didn't check that a port wasn't already > in use before using it before) > 2. Hash socket list so that systems with large numbers of sockets (either > listening or in data transfer modes) should work faster. As a side effect > this also speeds up the checking required by feature 1. > 3. Various documentation tweeks and updates Not tested the patch yet, but will do over the course of this week, but a mod to the doc: The ftp site at sourceforge is dead. All the files (including the Xservers) should now be available via http. This is sourceforge's decision and I'm not happy with it but there you are. I have no immediate plans to vacate sourceforge despite what is happening at VA Linux and Loic Dachary's article on Advogato. patrick |
|
From: Steven W. <st...@gw...> - 2001-11-18 14:14:36
|
Hi,
Here is a patch with the following features:
1. Fixes local port allocation bug (we didn't check that a port wasn't already
in use before using it before)
2. Hash socket list so that systems with large numbers of sockets (either
listening or in data transfer modes) should work faster. As a side effect
this also speeds up the checking required by feature 1.
3. Various documentation tweeks and updates
Still to do: Add code to send a message to connecting nodes when we run out
of local ports (see comment in dn_accept()).
Also, please note that this code
limits the maximum number of DECnet sockets (system wide) to 0xffff - 1. There
isn't really any need for this limit because if you take the local and remote
DECnet addresses into account during socket demultiplexing then you should be
able to have 0xffff - 1 connections to each remote node. I'm intending though
to use the rather simpler code in this patch for 2.4 and solve the problem
properly in 2.5. It won't be on my urgent problems list unless someone tells
me that they are finding the limits restrictive in the mean time though, so if
its a problem for you, let me know.
Please test this patch and let me know if it works (I've tested it and it
seems to work for me). Once I've got a few reports I'll request this to be
included in 2.4,
Steve.
-----------------------------------------------------------------------------
diff -Nru linux-2.4.15-pre5/Documentation/networking/decnet.txt linux/Documentation/networking/decnet.txt
--- linux-2.4.15-pre5/Documentation/networking/decnet.txt Sun Mar 11 21:33:27 2001
+++ linux/Documentation/networking/decnet.txt Sat Nov 17 20:12:02 2001
@@ -4,17 +4,10 @@
1) Other documentation....
o Project Home Pages
- http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html - Kernel info
+ http://www.chygwyn.com/DECnet/ - Kernel info
http://linux-decnet.sourceforge.net/ - Userland tools
o FTP sites
- ftp://ftp.sucs.swan.ac.uk/pub/Linux/DECnet/
- - Swansea University Computer Society DECnet Archive
- (contains kernel patches and info)
- - Mirror of userland tools on ftp.dreamtime.org
- - Mirror of Alexey Kuznetsov's iproute2 package and
- other utilities
-
ftp://linux-decnet.sourceforge.net/pub/linux-decnet/
- Patrick Caulfield's archive of userland tools and
Eduardo Serrat's kernel patches
@@ -34,6 +27,10 @@
CONFIG_NETLINK (to allow rtnetlink)
CONFIG_RTNETLINK (for communication with the kernel routing layer)
CONFIG_NETFILTER (will be required for the DECnet routing daemon)
+
+Don't turn on SIOCGIFCONF support for DECnet unless you are really sure
+that you need it, in general you won't and it can cause ifconfig to
+malfunction.
3) Command line options
diff -Nru linux-2.4.15-pre5/net/decnet/README linux/net/decnet/README
--- linux-2.4.15-pre5/net/decnet/README Wed May 26 17:36:36 1999
+++ linux/net/decnet/README Sat Nov 17 20:07:21 2001
@@ -3,6 +3,6 @@
The documentation for this kernel subsystem is available in the
Documentation/networking subdirctory of this distribution and also
-on line at http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html.
+on line at http://www.chygwyn.com/DECnet/
Steve Whitehouse <St...@AC...>
diff -Nru linux-2.4.15-pre5/net/decnet/af_decnet.c linux/net/decnet/af_decnet.c
--- linux-2.4.15-pre5/net/decnet/af_decnet.c Sat Nov 17 18:03:34 2001
+++ linux/net/decnet/af_decnet.c Sat Nov 17 23:27:51 2001
@@ -36,6 +36,7 @@
* Steve Whitehouse: Removed unused code. Fix to use sk->allocation
* when required.
* Patrick Caulfield: /proc/net/decnet now has object name/number
+ * Steve Whitehouse: Fixed local port allocation, hashed sk list
*/
@@ -139,9 +140,13 @@
dn_address decnet_address = 0;
unsigned char decnet_ether_address[ETH_ALEN] = { 0xAA, 0x00, 0x04, 0x00, 0x00, 0x00 };
+#define DN_SK_HASH_SHIFT 8
+#define DN_SK_HASH_SIZE (1 << DN_SK_HASH_SHIFT)
+#define DN_SK_HASH_MASK (DN_SK_HASH_SIZE - 1)
+
static struct proto_ops dn_proto_ops;
rwlock_t dn_hash_lock = RW_LOCK_UNLOCKED;
-static struct sock *dn_sklist;
+static struct sock *dn_sk_hash[DN_SK_HASH_SIZE];
static struct sock *dn_wild_sk;
static int __dn_setsockopt(struct socket *sock, int level, int optname, char *optval, int optlen, int flags);
@@ -154,18 +159,38 @@
if (scp->addr.sdn_flags & SDF_WILD)
return dn_wild_sk ? NULL : &dn_wild_sk;
- return &dn_sklist;
+ return &dn_sk_hash[scp->addrloc & DN_SK_HASH_MASK];
+}
+
+/*
+ * Valid ports are those greater than zero and not already in use.
+ */
+static int check_port(unsigned short port)
+{
+ struct sock *sk = dn_sk_hash[port & DN_SK_HASH_MASK];
+ if (port == 0)
+ return -1;
+ while(sk) {
+ struct dn_scp *scp = DN_SK(sk);
+ if (scp->addrloc == port)
+ return -1;
+ sk = sk->next;
+ }
+ return 0;
}
static unsigned short port_alloc(struct sock *sk)
{
struct dn_scp *scp = DN_SK(sk);
static unsigned short port = 0x2000;
+ unsigned short i_port = port;
- if (port == 0)
- port++;
+ while(check_port(++port) != 0) {
+ if (port == i_port)
+ return 0;
+ }
- scp->addrloc = port++;
+ scp->addrloc = port;
return 1;
}
@@ -238,6 +263,44 @@
sk->pprev = NULL;
}
+struct sock **listen_hash(struct sockaddr_dn *addr)
+{
+ int i;
+ unsigned hash = addr->sdn_objnum;
+
+ if (hash == 0) {
+ hash = addr->sdn_objnamel;
+ for(i = 0; i < addr->sdn_objnamel; i++) {
+ hash ^= addr->sdn_objname[i];
+ hash ^= (hash << 3);
+ }
+ }
+
+ return &dn_sk_hash[hash & DN_SK_HASH_MASK];
+}
+
+/*
+ * Called to transform a socket from bound (i.e. with a local address)
+ * into a listening socket (doesn't need a local port number) and rehashes
+ * based upon the object name/number.
+ */
+static void dn_rehash_sock(struct sock *sk)
+{
+ struct sock **skp = sk->pprev;
+
+ write_lock_bh(&dn_hash_lock);
+ while(*skp != sk)
+ skp = &((*skp)->next);
+ *skp = sk->next;
+
+ DN_SK(sk)->addrloc = 0;
+ skp = listen_hash(&DN_SK(sk)->addr);
+
+ sk->next = *skp;
+ sk->pprev = skp;
+ *skp = sk;
+ write_unlock_bh(&dn_hash_lock);
+}
int dn_sockaddr2username(struct sockaddr_dn *sdn, unsigned char *buf, unsigned char type)
{
@@ -328,10 +391,11 @@
struct sock *dn_sklist_find_listener(struct sockaddr_dn *addr)
{
+ struct sock **skp = listen_hash(addr);
struct sock *sk;
read_lock(&dn_hash_lock);
- for(sk = dn_sklist; sk != NULL; sk = sk->next) {
+ for(sk = *skp; sk != NULL; sk = sk->next) {
struct dn_scp *scp = DN_SK(sk);
if (sk->state != TCP_LISTEN)
continue;
@@ -365,7 +429,8 @@
struct dn_scp *scp;
read_lock(&dn_hash_lock);
- for(sk = dn_sklist; sk != NULL; sk = sk->next) {
+ sk = dn_sk_hash[cb->dst_port & DN_SK_HASH_MASK];
+ for (; sk != NULL; sk = sk->next) {
scp = DN_SK(sk);
if (cb->src != dn_saddr2dn(&scp->peer))
continue;
@@ -1045,6 +1110,9 @@
sizeof(struct optdata_dn));
lock_sock(newsk);
+ /*
+ * FIXME: This can fail if we've run out of local ports....
+ */
dn_hash_sock(newsk);
dn_send_conn_ack(newsk);
@@ -1200,6 +1268,7 @@
sk->ack_backlog = 0;
sk->state = TCP_LISTEN;
err = 0;
+ dn_rehash_sock(sk);
out:
release_sock(sk);
@@ -2063,44 +2132,47 @@
char buf2[DN_ASCBUF_LEN];
char local_object[DN_MAXOBJL+3];
char remote_object[DN_MAXOBJL+3];
+ int i;
len += sprintf(buffer + len, "Local Remote\n");
read_lock(&dn_hash_lock);
- for(sk = dn_sklist; sk != NULL; sk = sk->next) {
- scp = DN_SK(sk);
-
- dn_printable_object(&scp->addr, local_object);
- dn_printable_object(&scp->peer, remote_object);
-
- len += sprintf(buffer + len,
- "%6s/%04X %04d:%04d %04d:%04d %01d %-16s %6s/%04X %04d:%04d %04d:%04d %01d %-16s %4s %s\n",
- dn_addr2asc(dn_ntohs(dn_saddr2dn(&scp->addr)), buf1),
- scp->addrloc,
- scp->numdat,
- scp->numoth,
- scp->ackxmt_dat,
- scp->ackxmt_oth,
- scp->flowloc_sw,
- local_object,
- dn_addr2asc(dn_ntohs(dn_saddr2dn(&scp->peer)), buf2),
- scp->addrrem,
- scp->numdat_rcv,
- scp->numoth_rcv,
- scp->ackrcv_dat,
- scp->ackrcv_oth,
- scp->flowrem_sw,
- remote_object,
- dn_state2asc(scp->state),
- ((scp->accept_mode == ACC_IMMED) ? "IMMED" : "DEFER"));
-
- pos = begin + len;
- if (pos < offset) {
- len = 0;
- begin = pos;
+ for(i = 0; i < DN_SK_HASH_SIZE; i++) {
+ for(sk = dn_sk_hash[i]; sk != NULL; sk = sk->next) {
+ scp = DN_SK(sk);
+
+ dn_printable_object(&scp->addr, local_object);
+ dn_printable_object(&scp->peer, remote_object);
+
+ len += sprintf(buffer + len,
+ "%6s/%04X %04d:%04d %04d:%04d %01d %-16s %6s/%04X %04d:%04d %04d:%04d %01d %-16s %4s %s\n",
+ dn_addr2asc(dn_ntohs(dn_saddr2dn(&scp->addr)), buf1),
+ scp->addrloc,
+ scp->numdat,
+ scp->numoth,
+ scp->ackxmt_dat,
+ scp->ackxmt_oth,
+ scp->flowloc_sw,
+ local_object,
+ dn_addr2asc(dn_ntohs(dn_saddr2dn(&scp->peer)), buf2),
+ scp->addrrem,
+ scp->numdat_rcv,
+ scp->numoth_rcv,
+ scp->ackrcv_dat,
+ scp->ackrcv_oth,
+ scp->flowrem_sw,
+ remote_object,
+ dn_state2asc(scp->state),
+ ((scp->accept_mode == ACC_IMMED) ? "IMMED" : "DEFER"));
+
+ pos = begin + len;
+ if (pos < offset) {
+ len = 0;
+ begin = pos;
+ }
+ if (pos > (offset + length))
+ break;
}
- if (pos > (offset + length))
- break;
}
read_unlock(&dn_hash_lock);
@@ -2158,7 +2230,7 @@
MODULE_PARM_DESC(addr, "The DECnet address of this machine: area,node");
#endif
-static char banner[] __initdata = KERN_INFO "NET4: DECnet for Linux: V.2.4.9s (C) 1995-2001 Linux DECnet Project Team\n";
+static char banner[] __initdata = KERN_INFO "NET4: DECnet for Linux: V.2.4.15-pre5s (C) 1995-2001 Linux DECnet Project Team\n";
static int __init decnet_init(void)
{
|
|
From: Patrick C. <pa...@ty...> - 2001-11-10 14:11:23
|
On Sat, Nov 10, 2001 at 03:51:52PM +0100, sa...@ba... wrote: > > Regards to all, > > My linux box just work fine under DECnet network. Everything is in > function, thx to all. > > I have oinly one question, i hope it is last :) > on VMS system with SHOW NET commmand, i canot see node_name > fo my linux box, i see node_adress. Mybe it is exist some file on VMS > line decnet.conf for hosts or what ? You'll need privileged access to the VMS box to do this (that's usually the SYSTEM account). The commands are $ MCR NCP DEF NODE <number> NAME <name> $ MCR NCP SET NODE <number> NAME <name> eg If your Linux box is node 1.10 and called LINUX then type in: $ MCR NCP DEF NODE 1.10 NAME LINUX $ MCR NCP SET NODE 1.10 NAME LINUX The first command writes it to the permanent database (so it happens on a reboot), the second updates the volatile database (that currently in memory). patrick |
|
From: <sa...@ba...> - 2001-11-10 13:47:16
|
Regards to all, My linux box just work fine under DECnet network. Everything is in function, thx to all. I have oinly one question, i hope it is last :) on VMS system with SHOW NET commmand, i canot see node_name fo my linux box, i see node_adress. Mybe it is exist some file on VMS line decnet.conf for hosts or what ? regards, Sasa |
|
From: Patrick C. <pa...@ty...> - 2001-11-10 12:52:52
|
This is a minor update that mainly fixes a couple of bugs that were annoying me
as well as some Debian-specific changes.
For most of you the only two changes are that the tools now use cuserid() rather
than getlogin() to determine the username for proxy connections. This means that
you can use "su" or "sudo" and get the proxy you expected, and the fixing of a
stupid "error: success" message from dncopy.
This is the changelog:
* Don't print "done" when stopping daemons in dnet-progs.init.d
* Use cuserid() rather than getlogin() to determine username so that
commands run under su and sudo work as expected
* include <stdarg> in rms/getreply.cc so it compiles on hppa
* Use -fsigned-char when building uulib to make it more portable
* Fixed message "Error opening file for input: Success" when attempting
to fetch a locked file using dncopy
* Fix some lintian warnings
The Intel RPM is built on Red Hat 6.2. If you want to install it on Red Hat 7.2
you will need the following two packages installed.
compat-libstdc++-6.2-2.9.0.16.i386.rpm (on CD 1)
ncurses4-5.0-4.i386.rpm (on CD 2)
The Alpha RPM was built on Red Hat 7.2
The Intel DEBs are for potato, woody DEBs are in the main Debian archive as
usual.
patrick
|
|
From: Paul S. <psh...@st...> - 2001-11-08 13:11:23
|
At 17:11 07/11/01 +0100, you wrote: > >1 i am download new redhat 7.2 distribution with kernel 2.4 >2. i am install on new system with asus maiboard, ATA100, Vanta, 2 x >D-link 220 ethernet cards with AUI, BNC, UTP support, also i have HUB with >AUI, BNC, UTP [snip] >after changing in /etc/grub.conf > >kernel /boot/bzImage etc ether=3,0x300,eth0 ether=4,0x320,eth1 >it is look like ok both of cards are one TCP/IP network live I don't know the D-Link 220 or grub, but does this mean the cards are using IRQ 3 and 4? This is a very bad idea since IRQ4 is used by the first serial port and IRQ3 by the second serial port. This may result in some very strange behaviour. On most PCs, IRQs 5 and 10 are free. HTH, Paul Paul Sherwin Consulting 22 Monmouth Road, Oxford OX1 4TD, UK Phone +44 (0)1865 721438 http://www.psherwin.strayduck.com Mobile +44 (0)7931 578334 mailto:psh...@st... |
|
From: Patrick C. <pa...@ty...> - 2001-11-08 13:08:14
|
On Thu, Nov 08, 2001 at 02:28:50PM +0100, sa...@ba... wrote: > I have on my linux box two eth card with real MACADDRESS-es > > MACADDR=00:80:C8:2C:E4:C4 (eth0) > MACADDR=00:80:C8:2C:e4:A2 (eth1) > > i think it is not possible to change that > > i was add in /etc/sysconfig/network-scripts/ifcfg-eth0 > > calculated MACADDR for DECnet node 1.10 It is possible to change it and you have to. You can change the MAC address of an ethernet card to anything you like (trust me, I do this all the time!). Just put the mac address you want into /etc/sysconfig/network-scripts/ifcfg-eth0 AA:00:04:00:0A:04 is the MAC address for node 1.10. > but from other side > on VAX-es i only know node_name i do not know node_adress > > how i can see that ? You will need to find those out. If you can get a logon to the VAX type in $ MCR NCP SHOW KNOWN NODES That will show you the node names and their addresses. IF you can't do this then you'll just have to wait and see what truns up in /proc/net/decnet_neigh and connect to them (by number) to see what nodes they are. eg $ sethost 1.21 > for example i have linux box :veseli (1.10) > but for microVAX only i know MVAX0 which is node_name for sethost > and i also see some numbers on network interface on mikro VAX > it's like > > 36-25084-10-B01 its some kind of address > anybody know whatt is that ? As Henry says, I think that's a DEC part number. It looks like no MAC address I've ever seen. patrick |
|
From: <sa...@ba...> - 2001-11-08 13:07:49
|
------------------------------------------------------- Balkaninvestment Bank Sasa Buric balkaninvestment.com System Administrator On Thu, 8 Nov 2001, Henry W. Miller wrote: > Where are you seeing these numbers - on the card itself? It looks > DEC style part number, possibly the order number of the > board itself. on the card itself, i have DOS program for setings my card bat i can change only irq, base, pnp_mode, and port (BNC, UTP, AUI) there is no possibilites to change MAC addresses so what i shell to do ? regards, sasa |
|
From: Henry W. M. <hen...@at...> - 2001-11-08 12:54:50
|
----- Original Message -----
From: <sa...@ba...>
To: <lin...@li...>
Sent: Thursday, November 08, 2001 05:28
Subject: [Linux-decnet-user] Now i do not know what to do ?
> I have on my linux box two eth card with real MACADDRESS-es
>
> MACADDR=00:80:C8:2C:E4:C4 (eth0)
> MACADDR=00:80:C8:2C:e4:A2 (eth1)
>
> i think it is not possible to change that
>
> i was add in /etc/sysconfig/network-scripts/ifcfg-eth0
>
> calculated MACADDR for DECnet node 1.10
>
> i think everithing is ok
>
> i have started dnetd, phoned, ctermd
>
> and i do not have any other computer with decnet
> i have /etc/decnet.conf properly configured i think
>
> but when i try dnping veseli (veseli is DECnet name of linux box) there is
> no answer i am just waiting and waiting
>
> also is with phone and all other
>
> is that usual because i do not have any other mashine with decnet or what
> but when i try lo (loopback device) phone is working.
>
> where i can find cards with MACADDRESS-es in DECnet style
>
> but from other side
> on VAX-es i only know node_name i do not know node_adress
>
> how i can see that ?
>
> for example i have linux box :veseli (1.10)
> but for microVAX only i know MVAX0 which is node_name for sethost
> and i also see some numbers on network interface on mikro VAX
> it's like
>
> 36-25084-10-B01 its some kind of address
> anybody know whatt is that ?
> mybe i can convert that in node_address or MACADDRESS
>
>
Where are you seeing these numbers - on the card itself? It looks
like a DEC style part number, possibly the order number of the
board itself.
> thanx to all :)
>
>
> _______________________________________________
> Linux-decnet-user mailing list
> Lin...@li...
> https://lists.sourceforge.net/lists/listinfo/linux-decnet-user
-HWM
|
|
From: <sa...@ba...> - 2001-11-08 12:24:54
|
I have on my linux box two eth card with real MACADDRESS-es MACADDR=00:80:C8:2C:E4:C4 (eth0) MACADDR=00:80:C8:2C:e4:A2 (eth1) i think it is not possible to change that i was add in /etc/sysconfig/network-scripts/ifcfg-eth0 calculated MACADDR for DECnet node 1.10 i think everithing is ok i have started dnetd, phoned, ctermd and i do not have any other computer with decnet i have /etc/decnet.conf properly configured i think but when i try dnping veseli (veseli is DECnet name of linux box) there is no answer i am just waiting and waiting also is with phone and all other is that usual because i do not have any other mashine with decnet or what but when i try lo (loopback device) phone is working. where i can find cards with MACADDRESS-es in DECnet style but from other side on VAX-es i only know node_name i do not know node_adress how i can see that ? for example i have linux box :veseli (1.10) but for microVAX only i know MVAX0 which is node_name for sethost and i also see some numbers on network interface on mikro VAX it's like 36-25084-10-B01 its some kind of address anybody know whatt is that ? mybe i can convert that in node_address or MACADDRESS thanx to all :) |
|
From: Patrick C. <pa...@ty...> - 2001-11-07 15:45:20
|
On Wed, Nov 07, 2001 at 05:11:22PM +0100, sa...@ba... wrote: > > 1 i am download new redhat 7.2 distribution with kernel 2.4 > 2. i am install on new system with asus maiboard, ATA100, Vanta, 2 x > D-link 220 ethernet cards with AUI, BNC, UTP support, also i have HUB with > AUI, BNC, UTP > > 3. with original kernel everything is ok both card work fine > 4. PCT/IP network is ok > 5. I am bulid new kernel from manuals from sourceforge You're very nearly there. The lines in /etc/sysconfig/network-scripts need to be MACADDR=AA:00:04:00:01:04 To set the MAC address to match the DECnet address, you have 1.1 - make sure that does not conflict with a machine on the real DECnet network! You only need to set tha MAC address on the ethernet card that is connected to the DECnet network. Though if the two cards are on unconnected networks there is no harm in setting both to the same value. The RPMS will install OK on RedHat 7.2 *if* you have the following two packages installed: compat-libstdc++-6.2-2.9.0.16.i386.rpm (on CD 1) ncurses4-5.0-4.i386.rpm (on CD 2) The sources do build on RH7.2 but, again, you'll need ncurses5. ncurses 5 is fine for this, you don't need v4. And I think there may be other dev packages too I'm not too sure off-hand. patrick |
|
From: Steven W. <st...@gw...> - 2001-11-07 15:43:52
|
Hi,
>
>
> 1 i am download new redhat 7.2 distribution with kernel 2.4
> 2. i am install on new system with asus maiboard, ATA100, Vanta, 2 x
> D-link 220 ethernet cards with AUI, BNC, UTP support, also i have HUB with
> AUI, BNC, UTP
>
> 3. with original kernel everything is ok both card work fine
> 4. PCT/IP network is ok
> 5. I am bulid new kernel from manuals from sourceforge
>
> - make xconfig
> - DECnet support (m)
> - DECnet SIOCGIFCONF (y)
^ Are you 100% sure of this ? I suspect that you want
to say n here, but I don't think this is the cause
of the problem that you report.
> - SYSCTL support (y)
> - /proc file system support
>
[some more config commands snipped...]
The rest of your config looks fine.
>
> on booting only one card is live eth0 no eth1
>
> after changing in /etc/grub.conf
>
> kernel /boot/bzImage etc ether=3,0x300,eth0 ether=4,0x320,eth1
> it is look like ok both of cards are one TCP/IP network live
>
> what about DECnet ?
> file
>
> /etc/decnet.conf - properly configured
>
> after that i am download dnprogs-2.16 with a lot of troubles
> i thin i am install this package if i try rpm or tar.gz there are some
> errors on compile missed some files or what. what ever i am install
> dnprogs with rpm package on other linux 2.2.14 computer and manualy copy
> bin files on 2.4 linux
>
> well it's look as ok
>
The dnprogs package uses the kernel source for a header file. You need to
check that you compiled it on the same version of the kernel (2.2 vs. 2.4)
as you are using it on.
> script /etc/rc.d/init.d/decnet work properly
>
> in scripts
> /etc/sysconfig/network-scripts/ifcfg-eth0 and ifcfg-eth1
> i am put on the end of files lines
>
> MACADDR=00:80:C8:2C:E4:C4 (eth0)
> MACADDR=00:80:C8:2C:e4:A2 (eth1)
^^^^^^^^^^^^^^^^^ These don't conform to the DECnet standard for MAC
addresses, which is why your ethernet card is not
automatically recognised. The howto explains how
these should be set I think (its a while since I
looked at it :-)
>
> configuration of /etc/decnet.conf is as folow:
>
> executor 1.1 name veseli line eth0
>
> now on end ow /etc/rc.d/init.d/decnet script i was added
>
> echo "1.10" > /proc/sys/net/decnet/node_address
> echo "eth0" > /proc/sys/net/decnet/default_device
>
> i am put this two line on several startup scripts with hope an\bout
> working :)
>
> after rebooting of computer i have situation as folow
>
> in /proc/sys/net
>
> node_name:
> ???
This is fine. Its just a place for userland to lookup and read the nodename,
so it can be set by you if you want to use it.
> default_device:
> (nothing)
This ought to be set to the ethernet card which you want to use in the case that
there are no known routes in your neighbour cache to a particular destination.
The DECnet specification which covers routing will explain this in more detail,
but it will only be looked at as a fall back.
> node_address:
> 1.10
This looks fine. Your node address has been set correctly.
> debug:
> 0
> di_count, dr_count:
> 3
>
> dn_count:
> 1
> dst_gc_interval
> 2
> time_wait:30
>
All these are fine too.
>
> /config
>
> forwarding:
> (nothing)
> priority:
> 0
> t2:
> 1
> t3:
> 10
>
These are fine as well.
> /proc/net
> decnet_dev:
>
> Name Flags T1 Timer1 T3 Timer3 Blksize Pri State
> lo B 0000 0000 0002 0010 1498 000 00
> DevType Router Peer
> loopback
>
decnet_dev would have eth0 and/or eth1 in it had those cards been recognised
(see above comment about the MAC address). You won't be able to specify any
device as the default device unless it is listed in this table. The lo
device, just like TCP/IP is used for communication via DECnet within the
node itself.
> decnet_neigh:
> Addr Flags State Use Blksize Dev
> 1.10 --- 40 01 0001498 lo
>
This entry means that the node is able to see packets being sent over loopback.
On a real DECnet network, you should see entries for every host which is
directly attached to your physical network.
> decnet_cach:
> (nothing)
>
> decnet:
> local Remote
> 0.0/2014 0001:001 0000:0000 2 29 0.0/0000 0000:0000 0000:0000 2 0
> OPEN IMM ED
> 0.0 /2012 0001:0001 0000:0000 2 29 0.0/0000 0000:0000 0000:0000 2 0
> open imm ed etc.
>
This shows that your DECnet network daemons have started up ok.
> i am modify file /etc/rc.d/inet.d/decnet
>
> interfaces="eth0"
> startnet = "$prefix/sbin/startnet -hw $interfaces"
>
> and i have started phonetd
>
> when i try dnping veseli
> no route to host
>
> it is loo like is not in function
>
This is caused by the lack of a default route I think (as above).
> i am scare to go on real DECnet network and put my linux box, and DECnet
> is not in function
>
> How i can resolve my problems ? Mybe i am do something wrong ? I don't
> know ?
>
Well I'd be rather surprised if you could cause any problems with adding
a Linux DECnet box to a network unless you have configured it with a
duplicate address of another box on the network. You are pretty close
to having it working correctly though,
Steve
|
|
From: <sa...@ba...> - 2001-11-07 15:07:16
|
1 i am download new redhat 7.2 distribution with kernel 2.4 2. i am install on new system with asus maiboard, ATA100, Vanta, 2 x D-link 220 ethernet cards with AUI, BNC, UTP support, also i have HUB with AUI, BNC, UTP 3. with original kernel everything is ok both card work fine 4. PCT/IP network is ok 5. I am bulid new kernel from manuals from sourceforge - make xconfig - DECnet support (m) - DECnet SIOCGIFCONF (y) - SYSCTL support (y) - /proc file system support make dep make bzImage make modules make modules_install cp /usr/src/arch/i386/boot/bzImage /boot/bzImage make some changes on /etc/grub.conf and reboot mashine on booting only one card is live eth0 no eth1 after changing in /etc/grub.conf kernel /boot/bzImage etc ether=3,0x300,eth0 ether=4,0x320,eth1 it is look like ok both of cards are one TCP/IP network live what about DECnet ? file /etc/decnet.conf - properly configured after that i am download dnprogs-2.16 with a lot of troubles i thin i am install this package if i try rpm or tar.gz there are some errors on compile missed some files or what. what ever i am install dnprogs with rpm package on other linux 2.2.14 computer and manualy copy bin files on 2.4 linux well it's look as ok script /etc/rc.d/init.d/decnet work properly in scripts /etc/sysconfig/network-scripts/ifcfg-eth0 and ifcfg-eth1 i am put on the end of files lines MACADDR=00:80:C8:2C:E4:C4 (eth0) MACADDR=00:80:C8:2C:e4:A2 (eth1) configuration of /etc/decnet.conf is as folow: executor 1.1 name veseli line eth0 now on end ow /etc/rc.d/init.d/decnet script i was added echo "1.10" > /proc/sys/net/decnet/node_address echo "eth0" > /proc/sys/net/decnet/default_device i am put this two line on several startup scripts with hope an\bout working :) after rebooting of computer i have situation as folow in /proc/sys/net node_name: ??? default_device: (nothing) node_address: 1.10 debug: 0 di_count, dr_count: 3 dn_count: 1 dst_gc_interval 2 time_wait:30 /config forwarding: (nothing) priority: 0 t2: 1 t3: 10 /proc/net decnet_dev: Name Flags T1 Timer1 T3 Timer3 Blksize Pri State lo B 0000 0000 0002 0010 1498 000 00 DevType Router Peer loopback decnet_neigh: Addr Flags State Use Blksize Dev 1.10 --- 40 01 0001498 lo decnet_cach: (nothing) decnet: local Remote 0.0/2014 0001:001 0000:0000 2 29 0.0/0000 0000:0000 0000:0000 2 0 OPEN IMM ED 0.0 /2012 0001:0001 0000:0000 2 29 0.0/0000 0000:0000 0000:0000 2 0 open imm ed etc. i am modify file /etc/rc.d/inet.d/decnet interfaces="eth0" startnet = "$prefix/sbin/startnet -hw $interfaces" and i have started phonetd when i try dnping veseli no route to host it is loo like is not in function i am scare to go on real DECnet network and put my linux box, and DECnet is not in function How i can resolve my problems ? Mybe i am do something wrong ? I don't know ? Thx in advance Sasa Buric P.S. module decnet is loaded at boot time, i have checked that ... |
|
From: <sa...@ba...> - 2001-11-01 12:53:30
|
Well what i can say. Thanx for all answers. I will try to do something. Sasa |