PcapPlusPlus
pcpp::PciAddress Class Reference

#include <DpdkDevice.h>

Public Member Functions

 PciAddress ()
 
 PciAddress (uint16_t domain, uint8_t bus, uint8_t devid, uint8_t function)
 
std::string toString ()
 
bool operator== (const PciAddress &other) const
 

Public Attributes

uint16_t domain
 
uint8_t bus
 
uint8_t devid
 
uint8_t function
 

Detailed Description

A class representing a PCI address

Constructor & Destructor Documentation

◆ PciAddress() [1/2]

pcpp::PciAddress::PciAddress ( )
inline

Default c'tor that initializes all PCI address fields to 0 (until set otherwise, address will look like: 0000:00:00.0)

◆ PciAddress() [2/2]

pcpp::PciAddress::PciAddress ( uint16_t  domain,
uint8_t  bus,
uint8_t  devid,
uint8_t  function 
)
inline

A c'tor that initializes all PCI address fields

Parameters
[in]domainDevice domain
[in]busDevice bus id
[in]devidDevice ID
[in]functionDevice function

Member Function Documentation

◆ operator==()

bool pcpp::PciAddress::operator== ( const PciAddress other) const
inline

Comparison operator overload. Two PCI addresses are equal if all of their address parts (domain, bus, devid, function) are equal

◆ toString()

std::string pcpp::PciAddress::toString ( )
inline
Returns
The string format of the PCI address (xxxx:xx:xx.x)

Member Data Documentation

◆ bus

uint8_t pcpp::PciAddress::bus

Device bus id

◆ devid

uint8_t pcpp::PciAddress::devid

Device ID

◆ domain

uint16_t pcpp::PciAddress::domain

Device domain

◆ function

uint8_t pcpp::PciAddress::function

Device function