Re: ./EuGTK/GtkEngine.e to Irv

new topic     » goto parent     » topic index » view thread      » older message » newer message
PeteE said...

Here's one way to do it without using ifconfig. It creates a UDP socket, multicasts a packet to itself, and returns the from address. No error checking.

Brilliant!

PeteE said...
constant  
    setsockopt_ = define_c_func(-1, "setsockopt", {C_INT, C_INT, C_INT, C_POINTER, C_INT}, C_INT) 
     
    sockets:set_option(sock, SOL_SOCKET, SO_REUSEADDR, 1) 
 
    c_func(setsockopt_, {sock[1], IPPROTO_IP, IP_ADD_MEMBERSHIP, mreq, 12}) 

Ouch. Looks like we have a bug in set_option().

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu