Skip to content

Instantly share code, notes, and snippets.

View phx's full-sized avatar

phoenix phx

View GitHub Profile
@phx
phx / bind.c
Created September 30, 2023 00:51 — forked from stefansundin/bind.c
Bind programs to specific network interface. (Linux)
/*
https://gist.github.com/stefansundin/e4fce00d97f7694c7a27
http://www.ryde.net/code/bind.c.txt
http://daniel-lange.com/archives/53-Binding-applications-to-a-specific-IP.html
*/
/*
Copyright (C) 2000 Daniel Ryde
This library is free software; you can redistribute it and/or