Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)

Figure Protocol with Aliasing SO_PROTO FreeBSD 8.2

By: stnmrshx on Nov 20th, 2011  |  syntax: Diff  |  size: 0.75 KB  |  hits: 73  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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;