How to Verify Peering via script

We are upgrading our HAProxy installation and I want to verify all of our configuration is acting the same as I would expect. One thing I haven’t been able to verify is whether peering is setup correctly or not. I know that we can do a tcpdump and check that all of the IPs we list in the config are there, but we would like to automate it. Is there any way to do this? I looked through all of the socket commands and couldn’t find anything.

Thank you!