how to know gateway address of current connected wifi [duplicate] - iphone

This question already has answers here:
Get the Default Gateway
(9 answers)
Closed 9 years ago.
I want to know gateway address of current connected wifi through objective C programming.
I have gone through some online reference in stackoverflow but none of them is useful. Please know me the.
As for now I am able to get IP address, Mask but has been stuck in gateway.

You can programatically make a call to execute a terminal command using system(); and parse the output, or follow the advice in this question: Objective-C : How to fetch the router address?

Related

Alternatives to sockets [duplicate]

This question already has answers here:
What are the alternatives to Socket Programming?
(3 answers)
Closed 2 years ago.
I read a definition of sockets as "the most commonly used API for UDP/TCP connexions" (school material).
It makes me curious to know if there are alternatives, and have been unable to find one yet. I don't mean added abstraction layers (such as RPC or RMI for example), or things using a different network stack, but using something else that fullfills the same role in a different way.
I might have misunderstood the role of the socket too, I would consider it is fits in the session OSI layer, or maybe the transport one ? I'm not really sure about that.
I don't plan on using those alternatives, and I understand how convenient sockets are, I was just wondering.
Thanks for your interest
If you don't plan to use a different network stack, I think the answer is no. The reason behind this is that the socket is implemented tightly with the network stack. TCP and UDP, for example, both use socket to save the unsent data and received data . You can definitely implement some APIs to read data from and write data to those buffers. But I can't see any advantage in doing this, and those APIs are really built upon socket.

Finding IP of servers [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am learning about sockets and client-server applications. It seems as if the recommended approach is that the server should have a fixed IP address so that the client can find it. Is this correct? It seems as if there should be some type of startup technique where on initialization a program on the server (or the client) could generally broadcast their IP addresses to the other computers on the network, so that in case the server IP address changes the clients can still find it. Is this possible? I believe that "multicast" may be helpful, but it seems as if that is not always supported and/or the routers/switches must be configured to accept this or the technique would fail. Is this correct? I see that there are ways to perhaps use UDP to broadcast to any computer on the network, but it's not clear to me how the recipient computers can access this in a clear manner without a socket already set up - wouldn't there be confusion if other computers are already broadcasting on the same port? Is it just a protocol issue for the program to sort out to recognize the received packets? Do I just need to learn more about sockets? Any and all suggestions/pointers for where I could look would be greatly appreciated. Thanks so much in advance!
I am learning about sockets and client-server applications. It seems
as if the recommended approach is that the server should have a fixed
IP address so that the client can find it. Is this correct?
Yes, it is.
It seems as if there should be some type of startup technique where on
initialization a program on the server (or the client) could generally
broadcast their IP addresses to the other computers on the network, so
that in case the server IP address changes the clients can still find
it. Is this possible?
Yes, it is.
I believe that "multicast" may be helpful, but it seems as if that is
not always supported and/or the routers/switches must be configured to
accept this or the technique would fail. Is this correct?
No, multicast is not really helpful here, you mentioned why, and you should know multicast address in advance.
I see that there are ways to perhaps use UDP to broadcast to any
computer on the network, but it's not clear to me how the recipient
computers can access this in a clear manner without a socket already
set up - wouldn't there be confusion if other computers are already
broadcasting on the same port?
You just advertise your clients once in a while, for example every 5 secs or every 1 min, whatever interval you find ok. If someone sends on this port too - then you should use some unique structure, magic numbers and so on to distinguish one packets from another.
Is it just a protocol issue for the program to sort out to recognize
the received packets?
Yes, it is. On UDP.
Do I just need to learn more about sockets?
Absolutly yes. I suggest this book: Unix Network programming, it is good, even if you running non-UNIX environment.

How do I make my xampp server public using my public ip address? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have just installed xampp 1.7.7. I need to know what I need to do in order to make my website public using my public IP address (not 192.168.xxx.xxx) Also, I am behind a router (NETGEAR WPN824v3). I do have a dynamic IP address, but I have reserved the IP via my router. My operating system is Windows 7 Professional x64.
Do I need port forwarding? --> If so, what is the server IP (won't let me choose anything besides 192.168.xxx(cannot change).xxx(needs to be entered manually))? and what is the start port and end port?
What other changes do I need to make to make my website public without using:
127.0.0.1, 192.168.xxx.xxx,localhost,etc....
How do I configure a domain name (from DOT TK)?
Please give me a step-by-step detailed list of instructions on how to do this and don't refer me to other websites please!
Q: This sounds like a home network, correct?
Q: Do you have a registered domain? Or do you want people to access your site by IP address?
Your internal, LAN address is 192.168...
You can find your external ("WAN") address by looking at your router (which may be the Netgear, or might be yet another router - the one built in to your DSL or cable modem).
You can also find it by pointing your browser here:
http://www.whatismyip.com
Be advised that, unless you have a "static IP" from your provider, this external address might change at any time. It might stay the same for months ... or it might change multiple times/day. "It depends".
Be advised, too, that the moment you open anything on your firewall - especially a web site - you leave yourself potentially vulnerable to hackers. You absolutely need to make sure you have adequate security in place to protect against this eventuality.
Suggestion: look at DynDNS (or alternatives):
http://www.dyndnscommunity.com/
Or just shop around for a web hosting service that appeals to you :)
How do I register my domain(I don't want to use an ip address for my
name)
http://www.no-ip.com/ (free)

How to send message to specific channel regulary in irssi? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Need some info on IRC BOTS using PERL
How to write script/plugin to irssi which will be send specific text on some channel??
Maybe once a week.
Maybe is better way to send message to specific IRC channel in other script language.
I`s necessary to send message once a week.
I found only this question: Perl Irssi scripting: How to send msg to a specific channel?
And I wrote some code in ruby.
https://gist.github.com/1653215
I suggest you to just write a very small script in Perl using Bot::BasicBot.
See Need some info on IRC BOTS using PERL for details

How do you get network protocol enabled details on Network Adapters in PowerShell [duplicate]

This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
How do you retrieve a list of bound protocols to a network adapter? (in PowerShell or any language )
For a specific network adapter, how can I list what the protocols are? I'd like to enumerate each, and find their enabled/disabled status. In the Windows UI, this is shown as a checkmark. Protocols may include
Client for Microsoft Networks
Qos Packet Scheduler
Internet Protocol Version 6 (TCP/IPv6)
Internet Protocol Version 4 (TCP/IPv4)
Does anybody know how to get this?
This question seems very similar you what you want to achieve.
Detect If IPv6 is Enabled on Windows Machines
There are many different methods listed.