diff options
Diffstat (limited to 'net/decnet')
-rw-r--r-- | net/decnet/Kconfig | 23 | ||||
-rw-r--r-- | net/decnet/af_decnet.c | 10 | ||||
-rw-r--r-- | net/decnet/dn_fib.c | 3 | ||||
-rw-r--r-- | net/decnet/dn_nsp_out.c | 3 |
4 files changed, 32 insertions, 7 deletions
diff --git a/net/decnet/Kconfig b/net/decnet/Kconfig index 2101da542b..92f2ec46fd 100644 --- a/net/decnet/Kconfig +++ b/net/decnet/Kconfig | |||
@@ -1,6 +1,29 @@ | |||
1 | # | 1 | # |
2 | # DECnet configuration | 2 | # DECnet configuration |
3 | # | 3 | # |
4 | config DECNET | ||
5 | tristate "DECnet Support" | ||
6 | ---help--- | ||
7 | The DECnet networking protocol was used in many products made by | ||
8 | Digital (now Compaq). It provides reliable stream and sequenced | ||
9 | packet communications over which run a variety of services similar | ||
10 | to those which run over TCP/IP. | ||
11 | |||
12 | To find some tools to use with the kernel layer support, please | ||
13 | look at Patrick Caulfield's web site: | ||
14 | <http://linux-decnet.sourceforge.net/>. | ||
15 | |||
16 | More detailed documentation is available in | ||
17 | <file:Documentation/networking/decnet.txt>. | ||
18 | |||
19 | Be sure to say Y to "/proc file system support" and "Sysctl support" | ||
20 | below when using DECnet, since you will need sysctl support to aid | ||
21 | in configuration at run time. | ||
22 | |||
23 | The DECnet code is also available as a module ( = code which can be | ||
24 | inserted in and removed from the running kernel whenever you want). | ||
25 | The module is called decnet. | ||
26 | |||
4 | config DECNET_ROUTER | 27 | config DECNET_ROUTER |
5 | bool "DECnet: router support (EXPERIMENTAL)" | 28 | bool "DECnet: router support (EXPERIMENTAL)" |
6 | depends on DECNET && EXPERIMENTAL | 29 | depends on DECNET && EXPERIMENTAL |
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 29bb3cd219..96a02800cd 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c | |||
@@ -536,7 +536,7 @@ static void dn_keepalive(struct sock *sk) | |||
536 | * we are double checking that we are not sending too | 536 | * we are double checking that we are not sending too |
537 | * many of these keepalive frames. | 537 | * many of these keepalive frames. |
538 | */ | 538 | */ |
539 | if (skb_queue_len(&scp->other_xmit_queue) == 0) | 539 | if (skb_queue_empty(&scp->other_xmit_queue)) |
540 | dn_nsp_send_link(sk, DN_NOCHANGE, 0); | 540 | dn_nsp_send_link(sk, DN_NOCHANGE, 0); |
541 | } | 541 | } |
542 | 542 | ||
@@ -1191,7 +1191,7 @@ static unsigned int dn_poll(struct file *file, struct socket *sock, poll_table | |||
1191 | struct dn_scp *scp = DN_SK(sk); | 1191 | struct dn_scp *scp = DN_SK(sk); |
1192 | int mask = datagram_poll(file, sock, wait); | 1192 | int mask = datagram_poll(file, sock, wait); |
1193 | 1193 | ||
1194 | if (skb_queue_len(&scp->other_receive_queue)) | 1194 | if (!skb_queue_empty(&scp->other_receive_queue)) |
1195 | mask |= POLLRDBAND; | 1195 | mask |= POLLRDBAND; |
1196 | 1196 | ||
1197 | return mask; | 1197 | return mask; |
@@ -1214,7 +1214,7 @@ static int dn_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
1214 | 1214 | ||
1215 | case SIOCATMARK: | 1215 | case SIOCATMARK: |
1216 | lock_sock(sk); | 1216 | lock_sock(sk); |
1217 | val = (skb_queue_len(&scp->other_receive_queue) != 0); | 1217 | val = !skb_queue_empty(&scp->other_receive_queue); |
1218 | if (scp->state != DN_RUN) | 1218 | if (scp->state != DN_RUN) |
1219 | val = -ENOTCONN; | 1219 | val = -ENOTCONN; |
1220 | release_sock(sk); | 1220 | release_sock(sk); |
@@ -1630,7 +1630,7 @@ static int dn_data_ready(struct sock *sk, struct sk_buff_head *q, int flags, int | |||
1630 | int len = 0; | 1630 | int len = 0; |
1631 | 1631 | ||
1632 | if (flags & MSG_OOB) | 1632 | if (flags & MSG_OOB) |
1633 | return skb_queue_len(q) ? 1 : 0; | 1633 | return !skb_queue_empty(q) ? 1 : 0; |
1634 | 1634 | ||
1635 | while(skb != (struct sk_buff *)q) { | 1635 | while(skb != (struct sk_buff *)q) { |
1636 | struct dn_skb_cb *cb = DN_SKB_CB(skb); | 1636 | struct dn_skb_cb *cb = DN_SKB_CB(skb); |
@@ -1707,7 +1707,7 @@ static int dn_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
1707 | if (sk->sk_err) | 1707 | if (sk->sk_err) |
1708 | goto out; | 1708 | goto out; |
1709 | 1709 | ||
1710 | if (skb_queue_len(&scp->other_receive_queue)) { | 1710 | if (!skb_queue_empty(&scp->other_receive_queue)) { |
1711 | if (!(flags & MSG_OOB)) { | 1711 | if (!(flags & MSG_OOB)) { |
1712 | msg->msg_flags |= MSG_OOB; | 1712 | msg->msg_flags |= MSG_OOB; |
1713 | if (!scp->other_report) { | 1713 | if (!scp->other_report) { |
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c index 9934b25720..99bc061759 100644 --- a/net/decnet/dn_fib.c +++ b/net/decnet/dn_fib.c | |||
@@ -551,7 +551,8 @@ int dn_fib_dump(struct sk_buff *skb, struct netlink_callback *cb) | |||
551 | if (t < s_t) | 551 | if (t < s_t) |
552 | continue; | 552 | continue; |
553 | if (t > s_t) | 553 | if (t > s_t) |
554 | memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(int)); | 554 | memset(&cb->args[1], 0, |
555 | sizeof(cb->args) - sizeof(cb->args[0])); | ||
555 | tb = dn_fib_get_table(t, 0); | 556 | tb = dn_fib_get_table(t, 0); |
556 | if (tb == NULL) | 557 | if (tb == NULL) |
557 | continue; | 558 | continue; |
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c index 42abbf3f52..8cce1fdbda 100644 --- a/net/decnet/dn_nsp_out.c +++ b/net/decnet/dn_nsp_out.c | |||
@@ -342,7 +342,8 @@ int dn_nsp_xmit_timeout(struct sock *sk) | |||
342 | 342 | ||
343 | dn_nsp_output(sk); | 343 | dn_nsp_output(sk); |
344 | 344 | ||
345 | if (skb_queue_len(&scp->data_xmit_queue) || skb_queue_len(&scp->other_xmit_queue)) | 345 | if (!skb_queue_empty(&scp->data_xmit_queue) || |
346 | !skb_queue_empty(&scp->other_xmit_queue)) | ||
346 | scp->persist = dn_nsp_persist(sk); | 347 | scp->persist = dn_nsp_persist(sk); |
347 | 348 | ||
348 | return 0; | 349 | return 0; |