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