Skip to content

Commit

Permalink
Network: Add vendor/model strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Goldfish64 committed Sep 10, 2023
1 parent 8ccb1e5 commit 71cdc3f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
13 changes: 12 additions & 1 deletion MacHyperVSupport/Network/HyperVNetwork.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ class HyperVNetwork : public IOEthernetController {
//
void addNetworkMedium(UInt32 index, UInt32 type, UInt32 speed);
void createMediumDictionary();
bool readMACAddress();
IOReturn readMACAddress();
IOReturn setPacketFilter(UInt32 filter);
void updateLinkState(HyperVNetworkRNDISMessageIndicateStatus *indicateStatus);

public:
Expand All @@ -137,6 +138,16 @@ class HyperVNetwork : public IOEthernetController {
bool start(IOService *provider) APPLE_KEXT_OVERRIDE;
void stop(IOService *provider) APPLE_KEXT_OVERRIDE;

//
// IONetworkController overrides.
//
const OSString* newVendorString() const APPLE_KEXT_OVERRIDE {
return OSString::withCString(kHyperVNetworkVendor);
};
const OSString* newModelString() const APPLE_KEXT_OVERRIDE {
return OSString::withCString(kHyperVNetworkModel);
}

//
// IOEthernetController overrides.
//
Expand Down
3 changes: 3 additions & 0 deletions MacHyperVSupport/Network/HyperVNetworkRegs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
#define kHyperVNetworkMaximumTransId 0xFFFFFFFF
#define kHyperVNetworkSendTransIdBits 0xFA00000000000000

#define kHyperVNetworkVendor "Microsoft"
#define kHyperVNetworkModel "Hyper-V Network Adapter"

//
// Protocol versions.
//
Expand Down

0 comments on commit 71cdc3f

Please sign in to comment.