networking

Books for Computer Networking

Hi, I am a student of computer engineering from Vasula University, Somalia. We have a subject called Advanced Computer Networks and the following is the list of recommended books: Text Books: 1. B. A. Forouzan, "TCP/IP Protocol Suite", Tata McGraw Hill edition, Third Edition. 2. N. Olifer, V. Olifer, "Computer Networks: Principles, Te...

can i braodcast a UDP package to part of a network ?

i am trying to broadcast a UDP package using subnet. i want to braodcast my package to 192.168.1.255 ? can i do that ? and how using c++ ? ...

tool to find out distance in terms of no. of hops in unix

Hi! all, I am writing an application for video streaming.In the application server is required to know the distance of the client from it self in terms of hop number.My question is,is there any tool/method other than traceroute available in unix environment to find it? I also need to find out the geographical location of the client.So is...

How to choose InfiniBand or Ethernet programmatically?

I need (simple) program which allows to choose what to use to transfer data - Infiniband or Ethernet and switch them in runtime. I searched through InfiniBand docs, google and google/codeseaarch and have found nothing. Please provide program or tips where can I find such information. EDIT: OS and language of implementation doesn't matter...

Howto check if two hosts are the same

Hi, I just came across an issue, where I had to check if a path points into a windows share. Part of this problem is to check if host A is the same as host B. Where host A and host B can be one of the following {IPv4-Address, IPv6-Address, Hostname, FQDN}. As I do not need to be exact it's enough to resolve and compare the IP-Addresses ...

VB.Net Return IPv4 Address

How can I return the IPv4 address in VB.Net? eg. 192.168.1.5 ...

Getting "on the wire" Size of Messages in WCF

While I'm making SOAP or REST invocations to WCF, I'd like to have the channel stack on either end (client and server) record the on-the-wire size of the data received. So I'm guessing I need to add a custom behavior to the channel stack on either side. That is, on the server side I'd record the IP-header advertised size that was recei...

Win32 lineout (audio) funnelling over network

I have a linux box hooked up to an amplifier via optical out, I use MPD to play music out through the amp. I also watch movies using a Popcorn Hour connected to the amp and to a projector. During daylight it's not really possible to use the projector so I want to watch TV programs on my Windows laptop, but still take advantage of the amp...

Detect When Network Cable Unplugged

Windows knows when you have removed the network cable from your NIC. Is there a programmatic way to determine this via API in C++? Note: I am not using .NET and this is for a closed LAN (not connected to Internet ever) ...

WebService: Firefox can't establish a connection to the server at 192.168.10.203:8080

Hi, I am trying to create a WebService. I am not able to access the URL. If I try to connect to http://192.168.10.203:8080/EchoBeanService/EchoBean?wsdl I get an error: Firefox can't establish a connection to the server at 192.168.10.203:8080 However, if I am able to connect to the using localhost in the URL: http://localhost:8...

Java Getting Name/Description for OIDs in MIB

Hello, I am programming a network management system, and need to be able to print out meaningful names behind the OIDs that are received from SNMP traps. Due to the nature/size of this system, it would not be a good idea to manually map every OID to a meaningful name for every MIB on every device that is being used. With that said, is ...

My fwrite to a socket is not flushed, until the socket closes. How to change?

My fwrite to a socket is not flushed, until the socket closes. How to change? I want it to flush after each fwrite. I've tried: 1) flush() 2) fflush() 3) ob_implicit_flush(true); None of those worked, I still had to quit php for my socket to receive the data. Including some sample code, anything looks wrong? while($clientSocket =...

Constant Connectivity through Wi-Fi and 3G in Android

Hi All, I have a small doubt regarding network connection procedure in Android. My scenario is like, I am connecting to remote server over TCP using 3G. After it got connected, I enabled Wi-Fi. Android has switched to WiFi. And, still connection is alive with server, means there is no connection drop. Here, I want to know one thing. Wh...

What host do I have to bind a listening socket to?

I used python's socket module and tried to open a listening socket using import socket import sys def getServerSocket(host, port): for r in socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE): af, socktype, proto, canonname, sa = r try: ...

HTTP basic authentication using sockets in python

How to connect to a server using basic http auth thru sockets in python .I don't want to use urllib/urllib2 etc as my program does some low level socket I/O operations ...

Getting the 'external' IP address in Java

Hi I'm not too sure how to go about getting the external IP address of the machine as a computer outside of a network would see it. My following IPAddress class only gets the local IP address of the machine. Any help would be appreciated. Thanks. public class IPAddress { private InetAddress thisIp; private String thisIpAddress; pr...

How an application or website finds your ip?

I think there are only two ways a application or a server could get your IP. If it is an application, java/flash, I think it could check your network settings locally and send your IP back to the server. Then the server would know. The other way it could find is that it could analyze the packet headers. Then find there your IP inform...

On linux, how to check if port is in listen state without trying to connect.

Hi, How do I check with C if a port on my local machine (if required by passing an IP or interface, too), is in listen state? I don't want to connect to this port for checking because I don't want to irritate the service behind this port. I want to use this to add the missing net.tcp.listen item to Zabbix. EDIT - THIS IS THE REAL ANS...

Appropriate data structure for a buffer of the packets

How to implement a buffer of the packets where each packet is of the form: typedef struct{ int32 IP; //4-byte IP-address int16 ID; //unique sequence id }t_Packet; What should be the most appropriate data structure which: (1) allows to collect at least 8000 such packets (fast Insert and Delete operations) (2) allows ver...

Serialized task distribution: use thread or epoll?

Now I'm in such a situation that there is a group of predefined tasks for multiple clients to do(any client can take any task). When a client connects to the server, server choose a task from the uncompleted tasks and send it to the client --- job on the server side is quite easy. It takes a while for the client to finish the task and se...