(is_big_endian)
| 111 | |
| 112 | |
| 113 | def define_rte_pci_id(is_big_endian): |
| 114 | base_type = ctypes.LittleEndianStructure |
| 115 | if is_big_endian: |
| 116 | base_type = ctypes.BigEndianStructure |
| 117 | |
| 118 | class rte_pci_id(base_type): |
| 119 | _pack_ = True |
| 120 | _fields_ = [ |
| 121 | ("class_id", ctypes.c_uint32), |
| 122 | ("vendor_id", ctypes.c_uint16), |
| 123 | ("device_id", ctypes.c_uint16), |
| 124 | ("subsystem_vendor_id", ctypes.c_uint16), |
| 125 | ("subsystem_device_id", ctypes.c_uint16), |
| 126 | ] |
| 127 | |
| 128 | return rte_pci_id |
| 129 | |
| 130 | |
| 131 | class Driver: |