System.Net.NetworkInformation.LinuxNetworkInterface.GetSupportsMulticast C# (CSharp) Method

GetSupportsMulticast() private static method

private static GetSupportsMulticast ( string name ) : bool?
name string
return bool?
        private static bool? GetSupportsMulticast(string name)
        {
            // /sys/class/net/<interface_name>/flags
            string path = Path.Combine(NetworkFiles.SysClassNetFolder, name, NetworkFiles.FlagsFileName);

            if (File.Exists(path))
            {
                try
                {
                    Interop.LinuxNetDeviceFlags flags = (Interop.LinuxNetDeviceFlags)StringParsingHelpers.ParseRawHexFileAsInt(path);
                    return (flags & Interop.LinuxNetDeviceFlags.IFF_MULTICAST) == Interop.LinuxNetDeviceFlags.IFF_MULTICAST;
                }
                catch (Exception) // Ignore any problems accessing or parsing the file.
                {
                }
            }

            return null;
        }