locked
Retrieving Protocol Name column from API RRS feed

  • Question

  • I am using the API with an open capture file and am having a hard time figuring out how the GUI is populating the Protocol Name column.  I'd like to get that data from within the API, but all the functions are not returning the correct data.  Any ideas on this?
    Sunday, January 15, 2012 11:21 PM

Answers

  • Well, I figured it out myself, but wanted to place the answer here.

    I didn't need to place the keyArray into the function.  I made that input parameter null and now it is working:

     

    ret = Microsoft.NetworkMonitor.NetmonAPI.NmGetPropertyByName(myFrameParser, "Property.ProtocolName", bufferSize, pBuffer, out rLength, out vType, 3, null);

    • Marked as answer by Chris Siegle Monday, January 23, 2012 3:26 PM
    Monday, January 23, 2012 3:26 PM

All replies

  • Hi Chris,

    The Protocol Name Column is populated by a Property: "ProtocolName".  You can filter on it in the UI like so:

    Property.ProtocolName == "SSDP"

    To access this from the API you'll have to use the NmAddProperty and NmGetPropertyValueById functions or the NmGetPropertyValueByName function.

    Thanks,


    Michael Hawker | Program Manager | Network Monitor
    Tuesday, January 17, 2012 8:28 PM
  • Hi Michael - Thanks for the reply!

    I am able to add the property via NmAddProperty and get success:

    ret = Microsoft.NetworkMonitor.NetmonAPI.NmAddProperty(myFrameParserConfig, "Property.ProtocolName", out NameTableWithKeyPropID);

    However, when I try to pull out the value via either NmGetPropertyByName or NmGetPropertyById, the return buffer is always empty.  I hard coded the ID in the second call (I assumed the ID is an ordinal based on the added properties).

     

    ret = Microsoft.NetworkMonitor.NetmonAPI.NmGetPropertyByName(myFrameParser, "Property.ProtocolName", bufferSize, pBuffer, out rLength, out vType, 3, keyArray);

    ret = Microsoft.NetworkMonitor.NetmonAPI.NmGetPropertyById(myFrameParser, 0, bufferSize, pBuffer, out rLength, out vType, 3, keyArray);

    Monday, January 23, 2012 3:01 PM
  • Well, I figured it out myself, but wanted to place the answer here.

    I didn't need to place the keyArray into the function.  I made that input parameter null and now it is working:

     

    ret = Microsoft.NetworkMonitor.NetmonAPI.NmGetPropertyByName(myFrameParser, "Property.ProtocolName", bufferSize, pBuffer, out rLength, out vType, 3, null);

    • Marked as answer by Chris Siegle Monday, January 23, 2012 3:26 PM
    Monday, January 23, 2012 3:26 PM