locked
Programmatic Acces to the Prefix Policy Table? RRS feed

  • Question

  • Is there any way to get programmtic access (via an API, etc) to the prefix policy table?  That is, the RFC 3484 defined structure that is available in the "netsh int ipv46 show prefixpol" command?
    Wednesday, April 28, 2010 9:02 PM

All replies

  • you can use netsh to configure it:

       netsh.exe interface ipv6 add prefixpolicy
       netsh.exe interface ipv6 delete prefixpolicy
       netsh.exe interface ipv6 set prefixpolicy

    API wise, this functionality is private to the TCP/IP's NSI.  If this is functionality you require, I would suggest contacting Microsoft Product Support Services
    http://msdn.microsoft.com/en-us/library/b8akas30(VS.71).aspx.

    Hope this helps,


    Dusty Harper [MSFT]
    Microsoft Corporation
    ------------------------------------------------------------
    This posting is provided "AS IS", with NO warranties and confers NO rights
    ------------------------------------------------------------
    Thursday, April 29, 2010 1:40 AM
  • Thanks.  I was looking for programmatic access to the prefix policy table.  As is, I am reduced to scripting netsh.exe commands, which is a bit awkward, particularly when I have to parse the output of the "show prefixpolicy" command.  With the advent of IPv6 and dual-stack arrangements, the prefix policy table will have an increased impact on the health and diagnosis of a host's IP connectivity.
    Thursday, April 29, 2010 7:29 AM
  • There are discussions about exposing some of these interfaces including the one for the prefix policy table in Windows 8.  Rather than script it, you could use ShellExecute to invoke netsh, dump it's output to a file and parse from there.  The only benefit this brings though is the familiarity of C / C++.

    Sorry I couldn't be the bearer of better news :)

     


    Dusty Harper [MSFT]
    Microsoft Corporation
    ------------------------------------------------------------
    This posting is provided "AS IS", with NO warranties and confers NO rights
    ------------------------------------------------------------
    Thursday, April 29, 2010 4:45 PM