private static BroValue ConvertBroAddressToType(BroAddress value, BroType type) { if (type == BroType.String) { return(new BroValue(value.ToString(), type)); } return(null); }
/// <summary> /// Creates a new <see cref="BroSubnet"/> from existing Bro <paramref name="address"/> and <paramref name="width"/>. /// </summary> /// <param name="address"><see cref="BroAddress"/> of subnet.</param> /// <param name="width">Width of <paramref name="address"/> to consider.</param> /// <exception cref="ArgumentNullException"><paramref name="address"/> is <c>null</c>.</exception> public BroSubnet(BroAddress address, uint width) { if ((object)address == null) { throw new ArgumentNullException("address"); } m_subnet.sn_net = address.GetValue(); m_subnet.sn_width = width; }