]> Chaos Git - corbenik/ctrulib.git/commitdiff
Added host_macaddress parameter to udsScanBeacons().
authoryellows8 <yellows8@users.noreply.github.com>
Tue, 5 Apr 2016 15:01:16 +0000 (11:01 -0400)
committeryellows8 <yellows8@users.noreply.github.com>
Tue, 5 Apr 2016 15:01:16 +0000 (11:01 -0400)
libctru/include/3ds/services/uds.h
libctru/source/services/uds.c

index e01e4fd0e3a38c02e47f8517ec20a263118dc1bb..ef14bc6ebe295f20184e8e45e97cca9681607066 100644 (file)
@@ -162,8 +162,9 @@ void udsGenerateDefaultNetworkStruct(udsNetworkStruct *network, u32 wlancommID,
  * @Param total_networks Total number of networks stored under the networks buffer.
  * @param wlancommID Unique local-WLAN communications ID for each application.
  * @param id8 Additional ID that can be used by the application for different types of networks.
+ * @param host_macaddress When set, this code will only return network info from the specified host MAC address.
  */
-Result udsScanBeacons(u8 *outbuf, u32 maxsize, udsNetworkScanInfo **networks, u32 *total_networks, u32 wlancommID, u8 id8);
+Result udsScanBeacons(u8 *outbuf, u32 maxsize, udsNetworkScanInfo **networks, u32 *total_networks, u32 wlancommID, u8 id8, u8 *host_macaddress);
 
 /**
  * @brief Create a bind.
index 032be6a03df98428e2f14ecb59f62858692f208b..fef849be56449abb998ad8f82e646a7327266987 100644 (file)
@@ -332,7 +332,7 @@ Result udsDisconnectNetwork(void)
        return cmdbuf[1];
 }
 
-Result udsScanBeacons(u8 *outbuf, u32 maxsize, udsNetworkScanInfo **networks, u32 *total_networks, u32 wlancommID, u8 id8)
+Result udsScanBeacons(u8 *outbuf, u32 maxsize, udsNetworkScanInfo **networks, u32 *total_networks, u32 wlancommID, u8 id8, u8 *host_macaddress)
 {
        Result ret=0;
        Handle event=0;
@@ -353,6 +353,7 @@ Result udsScanBeacons(u8 *outbuf, u32 maxsize, udsNetworkScanInfo **networks, u3
        scaninput.unk_x6 = 0x6e;
 
        memset(scaninput.mac_address, 0xff, sizeof(scaninput.mac_address));
+       if(host_macaddress)memcpy(scaninput.mac_address, host_macaddress, sizeof(scaninput.mac_address));
 
        if(maxsize < sizeof(nwmBeaconDataReplyHeader))return -2;