diff options
author | Andrew Hendry <andrew.hendry@gmail.com> | 2009-11-19 08:30:41 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-19 08:30:41 +0100 |
commit | 386e50cc7d82b3799ea6f53267f04f123ae05afe (patch) | |
tree | 6134850a72bbb21e11c2318d84eba0667d7dcf54 /net/x25/x25_subr.c | |
parent | iwmc3200top: revamp fw name handling (diff) | |
download | linux-386e50cc7d82b3799ea6f53267f04f123ae05afe.tar.xz linux-386e50cc7d82b3799ea6f53267f04f123ae05afe.zip |
X25: Enable setting of cause and diagnostic fields
Adds SIOCX25SCAUSEDIAG, allowing X.25 programs to set the cause and
diagnostic fields.
Normally used to indicate status upon closing connections.
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/x25/x25_subr.c')
-rw-r--r-- | net/x25/x25_subr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/x25/x25_subr.c b/net/x25/x25_subr.c index 511a5986af3e..352b32d216fc 100644 --- a/net/x25/x25_subr.c +++ b/net/x25/x25_subr.c @@ -225,6 +225,12 @@ void x25_write_internal(struct sock *sk, int frametype) break; case X25_CLEAR_REQUEST: + dptr = skb_put(skb, 3); + *dptr++ = frametype; + *dptr++ = x25->causediag.cause; + *dptr++ = x25->causediag.diagnostic; + break; + case X25_RESET_REQUEST: dptr = skb_put(skb, 3); *dptr++ = frametype; |