Skip to content
/ stun Public

RFC5389 / tiny STUN protocol client implementation on C / Get my ip

License

Notifications You must be signed in to change notification settings

DEgITx/stun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Linux:

gcc stun.c stun_get_addr.c

Windows (mingw):

gcc stun.c stun_get_addr.c -l ws2_32

then

./a 173.194.222.127 19302 4233

implementation (include stun_get_addr.c in your project):

int stun_get_addr(char *stun_server_ip, short stun_server_port, short local_port, char *return_ip, short *return_port);

example:

char return_ip[50];
short return_port;
if (stun_get_addr("173.194.222.127", 19302, 4233, return_ip, &return_port) == 0) {
	printf("%s\n", return_ip);
} else {
	printf("some error\n");
}

About

RFC5389 / tiny STUN protocol client implementation on C / Get my ip

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages