patch-1.3.60 linux/net/netrom/af_netrom.c
Next file: linux/net/unix/af_unix.c
Previous file: linux/net/netlink.c
Back to the patch index
Back to the overall index
- Lines: 82
- Date:
Wed Feb 7 08:55:56 1996
- Orig file:
v1.3.59/linux/net/netrom/af_netrom.c
- Orig date:
Mon Dec 11 15:42:11 1995
diff -u --recursive --new-file v1.3.59/linux/net/netrom/af_netrom.c linux/net/netrom/af_netrom.c
@@ -60,12 +60,6 @@
#include <net/arp.h>
#include <linux/if_arp.h>
-/************************************************************************\
-* *
-* Handlers for the socket list *
-* *
-\************************************************************************/
-
struct nr_parms_struct nr_default;
static unsigned short circuit = 0x101;
@@ -278,19 +272,14 @@
restore_flags(flags);
}
-/*******************************************************************************************************************\
-* *
-* Handling for system calls applied via the various interfaces to a NET/ROM socket object *
-* *
-\*******************************************************************************************************************/
+/*
+ * Handling for system calls applied via the various interfaces to a
+ * NET/ROM socket object.
+ */
static int nr_fcntl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
- switch(cmd)
- {
- default:
- return(-EINVAL);
- }
+ return -EINVAL;
}
static int nr_setsockopt(struct socket *sock, int level, int optname,
@@ -686,14 +675,6 @@
if (addr_len != sizeof(struct sockaddr_ax25) && addr_len != sizeof(struct full_sockaddr_ax25))
return -EINVAL;
-#ifdef DONTDO
- if (nr_find_listener(&addr->fsa_ax25.sax25_call, sk->type) != NULL) {
- if (sk->debug)
- printk("NET/ROM: bind failed: in use\n");
- return -EADDRINUSE;
- }
-#endif
-
if ((dev = nr_dev_get(&addr->fsa_ax25.sax25_call)) == NULL) {
if (sk->debug)
printk("NET/ROM: bind failed: invalid node callsign\n");
@@ -759,12 +740,12 @@
if (addr_len != sizeof(struct sockaddr_ax25))
return -EINVAL;
- if ((dev = nr_dev_first()) == NULL)
- return -ENETUNREACH;
-
if (sk->zapped) { /* Must bind first - autobinding in this may or may not work */
sk->zapped = 0;
+ if ((dev = nr_dev_first()) == NULL)
+ return -ENETUNREACH;
+
source = (ax25_address *)dev->dev_addr;
if ((user = ax25_findbyuid(current->euid)) == NULL) {
@@ -852,8 +833,10 @@
if (sk->state != TCP_LISTEN)
return -EINVAL;
- /* The write queue this time is holding sockets ready to use
- hooked into the SABM we saved */
+ /*
+ * The write queue this time is holding sockets ready to use
+ * hooked into the SABM we saved
+ */
do {
cli();
if ((skb = skb_dequeue(&sk->receive_queue)) == NULL) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this