public void setRemoteMacAddress(MacAddress remoteMacAddress) {
        this.remoteMacAddress = remoteMacAddress;

        // Update the filter expression, if the handle is already open.
        if((receiveHandle != null) && (receiveHandle.isOpen())){
            MacAddress tempRemoteMacAddress = remoteMacAddress != null ? remoteMacAddress : MacAddress.getByAddress(new byte[]{0,0,0,0,0,0});
            String filter = config.getMacBasedFilterString(localMacAddress, tempRemoteMacAddress);
            if(!filter.isEmpty()) {
                try {
                    receiveHandle.setFilter(filter, BpfProgram.BpfCompileMode.OPTIMIZE);
                } catch (NotOpenException | PcapNativeException e) {
                    throw new RuntimeException("Error updating filter expression");
                }
            }
        }
    }
Channel based on a Pcap4J raw-socket, allowing to actively communicate based on ethernet frames.
plc4j/utils/raw-sockets/src/main/java/org/apache/plc4x/java/utils/rawsockets/netty/RawSocketChannel.java