MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / ETHAddMulticastAddress

Function ETHAddMulticastAddress

src/dolphin/src/eth/eth.c:932–959  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

930}
931
932void ETHAddMulticastAddress(const u8* macaddr) {
933 BOOL disabled;
934 u16 index;
935 u8 marNo;
936 u8 bitNo;
937 u8 ncrb;
938
939 if (memcmp(macaddr, broadcastheader, sizeof(broadcastheader)) == 0) {
940 waitexilock();
941 ncrb = readcmd(0x0001);
942 ncrb |= 4;
943 writecmd(0x0001, ncrb);
944 unlock();
945 } else {
946 index = HashIndex(macaddr);
947 marNo = index / 8;
948 bitNo = index % 8;
949 disabled = OSDisableInterrupts();
950 mcastmap[marNo] |= 1 << bitNo;
951 mcastUpdate = TRUE;
952
953 if (lock()) {
954 unlock();
955 }
956
957 OSRestoreInterrupts(disabled);
958 }
959}
960
961void ETHChangeIntPriority(BOOL flag) {
962 __recvpriorityflag = flag;

Callers

nothing calls this directly

Calls 8

memcmpFunction · 0.85
waitexilockFunction · 0.85
readcmdFunction · 0.85
writecmdFunction · 0.85
unlockFunction · 0.85
HashIndexFunction · 0.85
OSDisableInterruptsFunction · 0.85
lockFunction · 0.85

Tested by

no test coverage detected