ifmedia: Add two helper functions for ifmedia_add and ifmedia_set
commit38c053eecdc3700db87b0324f84da2a06f2385c8
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 3 Dec 2015 02:48:03 +0000 (3 10:48 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 3 Dec 2015 02:50:08 +0000 (3 10:50 +0800)
tree82b0a96f012c4e3a4ac85994c43f50fb70eaf457
parent17707afb124f9fe484dbaed452ae09e5c0b61267
ifmedia: Add two helper functions for ifmedia_add and ifmedia_set

- ifmedia_add_nodup() will not add duplicated media into ifmedia
- ifmedia_tryset() will fail, if the target media does not exist
sys/net/if_media.c
sys/net/if_media.h