// Network Layer public bool SendPacket(MAC adapter, IPv4Header data) { if (NetworkInterfaces.ContainsKey(adapter)) { NetworkInterfaces[adapter].SendPacket(data.ToBytes()); return(true); } else { return(false); } }
public static bool TryParse(String MACAddressIn, out MAC MACAddressOut) { try { MAC Mac; Mac = Parse(MACAddressIn); MACAddressOut = Mac; return(true); } catch { MACAddressOut = null; return(false); } }