{"id":6680,"date":"2014-10-30T22:46:20","date_gmt":"2014-10-30T21:46:20","guid":{"rendered":"http:\/\/daniel.haxx.se\/blog\/?p=6680"},"modified":"2014-10-30T22:46:20","modified_gmt":"2014-10-30T21:46:20","slug":"changing-networks-on-mac-with-firefox","status":"publish","type":"post","link":"https:\/\/daniel.haxx.se\/blog\/2014\/10\/30\/changing-networks-on-mac-with-firefox\/","title":{"rendered":"Changing networks on Mac with Firefox"},"content":{"rendered":"<p>Not too long ago I blogged about my work to better <a href=\"http:\/\/daniel.haxx.se\/blog\/2014\/09\/26\/changing-networks-with-firefox-running\/\">deal with changing networks while Firefox is running<\/a>. That job was basically two parts.<\/p>\n<p style=\"padding-left: 30px;\">A) generic code to handle receiving such a network-changed event and then<\/p>\n<p style=\"padding-left: 30px;\">B) a platform specific part that was for Windows that detected such a network change and sent the event<\/p>\n<p>Today I&#8217;ve landed yet another fix for part B called <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1079385\">bug 1079385<\/a>, which detects network changes for Firefox on Mac OS X.<\/p>\n<p><a href=\"http:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2014\/10\/mac-mini.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-thumbnail wp-image-6708\" style=\"margin: 8px;\" title=\"mac mini\" src=\"http:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2014\/10\/mac-mini-150x51.jpg\" alt=\"mac mini\" width=\"150\" height=\"51\" srcset=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2014\/10\/mac-mini-150x51.jpg 150w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2014\/10\/mac-mini-300x103.jpg 300w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2014\/10\/mac-mini-1024x354.jpg 1024w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2014\/10\/mac-mini.jpg 1408w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a>I&#8217;ve never programmed anything before on the Mac so this was sort of my christening in this environment. I mean, I&#8217;ve written countless of POSIX compliant programs including <a href=\"http:\/\/curl.haxx.se\/\">curl<\/a> and friends that certainly builds and runs on Mac OS just fine, but I never before used the Mac-specific APIs to do things.<\/p>\n<p>I got a mac mini just two weeks ago to work on this. Getting it up, prepared and my first Firefox built from source took all-in-all less than three hours. Learning the details of the mac API world was much more trouble and can&#8217;t say that I&#8217;m mastering it now either but I did find myself at least figuring out how to detect when IP addresses on the interfaces change and a changed address is a pretty good signal that the network changed somehow.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Not too long ago I blogged about my work to better deal with changing networks while Firefox is running. That job was basically two parts. A) generic code to handle receiving such a network-changed event and then B) a platform specific part that was for Windows that detected such a network change and sent the &hellip; <a href=\"https:\/\/daniel.haxx.se\/blog\/2014\/10\/30\/changing-networks-on-mac-with-firefox\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Changing networks on Mac with Firefox<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[393,22,13,6,45],"tags":[273,86,404,219],"class_list":["post-6680","post","type-post","status-publish","format-standard","hentry","category-firefox-floss","category-mozilla","category-net","category-floss","category-web","tag-apple","tag-firefox","tag-mac-os-x","tag-network"],"_links":{"self":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/6680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/comments?post=6680"}],"version-history":[{"count":14,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/6680\/revisions"}],"predecessor-version":[{"id":6714,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/6680\/revisions\/6714"}],"wp:attachment":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/media?parent=6680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/categories?post=6680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/tags?post=6680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}