System.Net.IPAddress.Address已过时

loading_2012 2013-05-03 05:02:36

IPAddress[] ips = Dns.GetHostAddresses(txbIp.Text);//获得指定主机IP地址族
foreach (IPAddress ip in ips)//循环遍历得到的IP地址
{
//在LABEL标签中显示得到的IP地址

labMessage.Text = "网际协议地址:" + ip.Address + "\nIP地址的地址族" + ip.AddressFamily.ToString() + "\n是否IPV6链接本地地址:" + ip.IsIPv6LinkLocal;
}


提示Address已过时,我想问一下用GetAddressBytes方法怎么写?
...全文
214 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
gomoku 2013-05-04
  • 打赏
  • 举报
回复
如果要得到诸如192.168.1.1的字符串,直接ip.ToString()就可以了。
全志R16平台的android6.0.1系统下的RTL8188EU的配置V1.0 2017/5/31 10:30 1、R:\wyb\rtl8188eu_r16m_20161208\android\device\softwinner\astar-evb30\overlay\frameworks\base\core\res\res\values\config.xml "wlan0" RTL8188EU没有BT,需要干掉BT的配置(不要显示): "bt-pan" 2、 R:\wyb\rtl8188eu_r16m_20161208\android\device\softwinner\astar-evb30\astar_evb30.mk PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.camera.xml:system/etc/permissions/android.hardware.camera.xml \ frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml \ (干掉BT部分)frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml 开启ADB,方便调试: PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.usb.config=mtp \ ro.adb.secure=1 \ ro.sys.mutedrm=true \ rw.logger=0 修改为: PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.usb.config=mass_storage,adb \ ro.adb.secure=0 \ ro.sys.mutedrm=true \ rw.logger=0 3、 R:\wyb\rtl8188eu_r16m_20161208\android\device\softwinner\astar-evb30\BoardConfig.mk # wifi and bt configuration # 1. Wifi Configuration # 1.1 realtek wifi support # 1.1 realtek wifi configuration # BOARD_USR_WIFI: rtl8188eu/rtl8723bs/rtl8723bs_vq0/rtl8723cs (打开realtek这个开关,并配置为rtl8188eu,默认为:rtl8723bs_vq0) BOARD_WIFI_VENDOR := realtek ifeq ($(BOARD_WIFI_VENDOR), realtek) WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_DRIVER := NL80211 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_rtl #BOARD_USR_WIFI := rtl8723bs_vq0 BOARD_USR_WIFI := rtl8188eu BOARD_WLAN_DEVICE := rtl8188eu include hardware/realtek/wlan/config/config.mk endif # 1.2 broadcom wifi support (关闭) #BOARD_WIFI_VENDOR := broadcom ifeq ($(BOARD_WIFI_VENDOR), broadcom) BOARD_WPA_SUPPLICANT_DRIVER := NL80211 WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd BOARD_WLAN_DEVICE := bcmdhd WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path" BOARD_USR_WIFI := ap6212 include hardware/broadcom/wlan/bcmdhd/firmware/$(BOARD_USR_WIFI)/device-bcm.mk endif (关闭) ## 2. Bluetooth Configuration ## make sure BOARD_HAVE_BLUETOOTH is true for every bt vendor #BOARD_HAVE_BLUETOOTH := true #BOARD_HAVE_BLUETOOTH_BCM := true #BOARD_HAVE_BLUETOOTH_NAME := ap6212 #BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/softwinner/astar-evb30/bluetooth 4、 R:\wyb\rtl8188eu_r16m_20161208\android\device\softwinner\astar-evb30\init.sun8i.rc # network (关闭博通:AP6212,打开realtek) #insmod /system/vendor/modules/bcmdhd.ko #insmod /system/vendor/modules/bcm_btlpm.ko insmod /system/vendor/modules/8188eu.ko insmod /system/vendor/modules/usbnet.ko insmod /system/vendor/modules/asix.ko insmod /system/vendor/modules/qf9700.ko insmod /system/vendor/modules/mcs7830.ko insmod /system/vendor/modules/smsc95xx.ko insmod /system/vendor/modules/rtl8150.ko insmod /system/vendor/modules/cdc_ether.ko (关闭) ## bluetooth # # UART device # chmod 0660 /dev/ttyS1 # chown bluetooth net_bt_stack /dev/ttyS1 # # # power up/down interface # chmod 0660 /sys/class/rfkill/rfkill0/state # chmod 0660 /sys/class/rfkill/rfkill0/type # chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state # chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type # # # bluetooth MAC address programming # chown bluetooth net_bt_stack ro.bt.bdaddr_path # chown bluetooth net_bt_stack /system/etc/bluetooth # chown bluetooth net_bt_stack /data/misc/bluetooth # setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr" # # # bluetooth LPM # chmod 0220 /proc/bluetooth/sleep/lpm # chmod 0220 /proc/bluetooth/sleep/btwrite # chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm # chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite (关闭博通的部分:AP6212) ## broadcom wifi service ## 1 broadcom wifi sta service #service wpa_supplicant /system/bin/wpa_supplicant \ # -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ # -I/system/etc/wifi/wpa_supplicant_overlay.conf \ # -O/data/misc/wifi/sockets \ # -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 # # we will start as root and wpa_supplicant will switch to user wifi # # after setting up the capabilities required for WEXT # # user wifi # # group wifi inet keystore # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot # ## 2 broadcom wifi sta p2p concurrent service #service p2p_supplicant /system/bin/wpa_supplicant \ # -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ # -I/system/etc/wifi/wpa_supplicant_overlay.conf \ # -O/data/misc/wifi/sockets -N \ # -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ # -I/system/etc/wifi/p2p_supplicant_overlay.conf \ # -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin \ # -g@android:wpa_wlan0 # # we will start as root and wpa_supplicant will switch to user wifi # # after setting up the capabilities required for WEXT # # user wifi # # group wifi inet keystore # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot (增加rtl8188eu部分) # realtek wifi service service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -O/data/misc/wifi/sockets \ -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot # 1.2 realtek wifi sta p2p concurrent service service p2p_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ -e/data/misc/wifi/entropy.bin -N \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -O/data/misc/wifi/sockets \ -g@android:wpa_wlan0 class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot 5、 R:\wyb\rtl8188eu_r16m_20161208\android\hardware\realtek\bluetooth\firmware\rtlbtfw_cfg.mk $(LOCAL_PATH)/rtl8703b_config:system/etc/firmware/rtl8703bs_config (关闭realtek的BT,否则会编译出错:) #$(TOP_DIR)device/softwinner/$(basename $(TARGET_DEVICE))/bluetooth/rtkbt.conf:system/etc/bluetooth/rtkbt.conf \ make: *** 没有规则可以创建“out/target/product/astar-evb30/system/etc/bluetooth/rtkbt.conf”需要的目标“device/softwinner/astar-evb30/bluetooth/rtkbt.conf”。 停止。 Export includes file: external/sqlite/dist/Android.mk -- out/target/product/astar-evb30/obj/EXECUTABLES/sqlite3_intermediates/export_includes Notice file: external/sqlite/dist/NOTICE -- out/target/product/astar-evb30/obj/NOTICE_FILES/src//system/xbin/sqlite3.txt Import includes file: out/target/product/astar-evb30/obj/EXECUTABLES/strace_intermediates/import_includes Export includes file: external/strace/Android.mk -- out/target/product/astar-evb30/obj/EXECUTABLES/strace_intermediates/export_includes Import includes file: out/target/product/astar-evb30/obj/EXECUTABLES/su_intermediates/import_includes Export includes file: system/extras/su/Android.mk -- out/target/product/astar-evb30/obj/EXECUTABLES/su_intermediates/export_includes Notice file: system/extras/su/NOTICE -- out/target/product/astar-evb30/obj/NOTICE_FILES/src//system/xbin/su.txt Import includes file: out/target/product/astar-evb30/obj/EXECUTABLES/taskstats_intermediates/import_includes Export includes file: system/extras/taskstats/Android.mk -- out/target/product/astar-evb30/obj/EXECUTABLES/taskstats_intermediates/export_includes Notice file: system/extras/taskstats/NOTICE -- out/target/product/astar-evb30/obj/NOTICE_FILES/src//system/xbin/taskstats.txt Import includes file: out/target/product/astar-evb30/obj/EXECUTABLES/tcpdump_intermediates/import_includes Export includes file: external/tcpdump/Android.mk -- out/target/product/astar-evb30/obj/EXECUTABLES/tcpdump_intermediates/export_includes Import includes file: out/target/product/astar-evb30/obj/EXECUTABLES/timeinfo_intermediates/import_includes Export includes file: system/extras/timeinfo/Android.mk -- out/target/product/astar-evb30/obj/EXECUTABLES/timeinfo_intermediates/export_includes Notice file: system/extras/timeinfo/NOTICE -- out/target/product/astar-evb30/obj/NOTICE_FILES/src//system/xbin/timeinfo.txt make: *** 没有规则可以创建“out/target/product/astar-evb30/system/etc/bluetooth/rtkbt.conf”需要的目标“device/softwinner/astar-evb30/bluetooth/rtkbt.conf”。 停止。 make: *** 正在等待未完成的任务.... 12585 unique nodes, 42861 total 注: 某些输入文件使用或覆盖了已过时的 API。 注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。 注: 某些输入文件使用了未经检查或不安全的操作。 注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。 12585 unique nodes, 42861 total 21515 unique nodes, 102669 total #### make failed to build some targets (01:21 (mm:ss)) #### rootroot@cm-System-Product-Name:/home/rediron/r16m/rtl8188eu_r16m_20161208/android$ grep rtkbt.conf . -R Z:\home\rediron\r16m\rtl8188eu_r16m_20161208\android\hardware\realtek\bluetooth\firmware\rtlbtfw_cfg.mk 6、 R:\wyb\rtl8188eu_r16m_20161208\lichee\tools\pack\chips\sun8iw5p1\configs\evb-30\sys_config.fex (关闭BT) ;-------------------------------------------------------------------------------- ;bluetooth configuration ;bt_used: 0- no used, 1- used ;bt_uard_id: 0- uart0, 1- uart1, 2- uart2 ;bt_rst_n: bt function enable io ;bt_wake: host wake-up bluetooth device ;bt_wak_host: bt device wake-up host ;bt_host_wake_invert: whether bt_host_wake use inverter between ap and module ; 0: not used, 1: used ;-------------------------------------------------------------------------------- [bt_para] bt_used = 0 bt_uart_id = 1 bt_rst_n = port:PL08<1><0> bt_wake = port:PL10<1><0> bt_host_wake = port:PL09<4><0> bt_host_wake_invert = 0 7、配置USB1(接RTL8188EU) rootroot@cm-System-Product-Name:/home/rediron/r16m/rtl8188eu_r16m_20161208$ rootroot@cm-System-Product-Name:/home/rediron/r16m/rtl8188eu_r16m_20161208$ cd lichee/ rootroot@cm-System-Product-Name:/home/rediron/r16m/rtl8188eu_r16m_20161208/lichee$ cd linux-3.4/ rootroot@cm-System-Product-Name:/home/rediron/r16m/rtl8188eu_r16m_20161208/lichee/linux-3.4$ rootroot@cm-System-Product-Name:/home/rediron/r16m/rtl8188eu_r16m_20161208/lichee/linux-3.4$ make ARCH=arm menuconfig Device Drivers ---> [*] USB support ---> <*> SoftWinner SUNXI USB Host Controller support <*> SoftWinner SUNXI USB Host Controller0 <*> SoftWinner SUNXI USB HCI <*> SoftWinner SUNXI USB EHCI0 < > SoftWinner SUNXI USB EHCI1 修改为: <*> SoftWinner SUNXI USB EHCI1 <*> SoftWinner SUNXI USB OHCI0 < > SoftWinner SUNXI USB OHCI1 修改为: <*> SoftWinner SUNXI USB OHCI1 < > SoftWinner SUNXI USB EHCI2 < > SoftWinner SUNXI USB OHCI2 < > SoftWinner SUNXI USB EHCI3 < > SoftWinner SUNXI USB OHCI3 < > SoftWinner SUNXI USB HSIC 不加这里内核报错,但是不影响上网! shell@astar-evb30:/ $ shell@astar-evb30:/ $ [ 30.993687] hci: ERR: not support sunxi_usb_enable_ehci [ 30.999650] hci: ERR: not support sunxi_usb_enable_ohci shell@astar-evb30:/ $ shell@astar-evb30:/ $

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧