stnmrshx

Figure Protocol with Aliasing SO_PROTO FreeBSD 8.2

Nov 20th, 2011
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.75 KB | None | 0 0
  1. --- src/sys/sys/socket.h.orig   2011-02-16 16:18:46.000000000 +0200
  2. +++ src/sys/sys/socket.h    2011-11-21 05:02:21.000000000 +0200
  3. @@ -140,6 +140,8 @@
  4.  #define    SO_LISTENINCQLEN    0x1013  /* socket's incomplete queue length */
  5.  #define    SO_USETFIB  0x1014  /* use this FIB to route */
  6.  #endif
  7. +#define SO_PROTO   0x1015
  8. +#define SO_PROTOCOL    SO_PROTO
  9.  
  10.  /*
  11.   * Structure used for manipulating linger option.
  12. --- src/sys/kern/uipc_socket.c.orig 2011-02-16 16:18:46.000000000 +0200
  13. +++ src/sys/kern/uipc_socket.c  2011-11-21 05:05:09.000000000 +0200
  14. @@ -2734,6 +2734,10 @@
  15.             optval = so->so_type;
  16.             goto integer;
  17.  
  18. +       case SO_PROTO:
  19. +           optval = so->so_proto->pr_protocol;
  20. +           goto integer;
  21. +
  22.         case SO_LISTENQLEN:
  23.             optval = so->so_qlen;
  24.             goto integer;
Add Comment
Please, Sign In to add comment