--nextPart3864928.GyVzQBLTcN Content-Type: multipart/mixed; boundary="nextPart5710747.CADQ2ixL8P" Content-Transfer-Encoding: 7Bit This is a multi-part message in MIME format. --nextPart5710747.CADQ2ixL8P Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Hi, attached there is the (simple) implementation of the read-only SO_ACCEPTCONN socket option in pflocal. (pfinet could need it too, just need to dig into its Linux code more.) May I push it? Thanks, -- Pino Toscano --nextPart5710747.CADQ2ixL8P Content-Disposition: attachment; filename="0001-pflocal-return-the-SO_ACCEPTCONN-socket-option.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0001-pflocal-return-the-SO_ACCEPTCONN-socket-option.patch" From 18d76905be35500afdb8ef47c1086f6376540da4 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sat, 7 Sep 2013 18:30:03 +0200 Subject: [PATCH] pflocal: return the SO_ACCEPTCONN socket option * pflocal/socket.c (S_socket_getopt) : New case. --- pflocal/socket.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pflocal/socket.c b/pflocal/socket.c index ce1edd8..7b6f283 100644 --- a/pflocal/socket.c +++ b/pflocal/socket.c @@ -438,6 +438,11 @@ S_socket_getopt (struct sock_user *user, *(int *)*value = user->sock->pipe_class->sock_type; *value_len = sizeof (int); break; + case SO_ACCEPTCONN: + assert (*value_len >= sizeof (int)); + *(int *)*value = user->sock->addr != NULL ? 1 : 0; + *value_len = sizeof (int); + break; default: ret = ENOPROTOOPT; break; -- 1.8.4.rc3 --nextPart5710747.CADQ2ixL8P-- --nextPart3864928.GyVzQBLTcN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iD8DBQBSK1ihTNH2piB/L3oRAi2UAKDICCvONOhdUmrq17/0JJ7Dbz0hPACfYSX6 Hd8o5RWJ/e3voU4LdvETKM8= =Sqby -----END PGP SIGNATURE----- --nextPart3864928.GyVzQBLTcN--