network-programming

Where would I start to learn about programming something like an IM program?

The IM program was just an example, but where would I start to learn how to get input from another computer across the network whether that network is LAN or through the internet? EDIT:: The languages I'm familiar with are C++ and python. The platform I'm on is vista 64bit ...

Get all IPs in the same network as my computer

Is there any way to programatically (in c#) get all the other workstations that are in the same domain/subnetwork as my computer and display some information about them (if they are active, what kind of OS they have installed, their IP etc)? ...

Linux Wireless Network Testbed

Hi all, I am writing a linux testbed for wireless sensor networks. The core objective is to test data transfer between any two nodes. The network runs using tree topology. One node in the network is the "Driver". This node is connected using serial port to a linux PC. What I am trying to write is the software on this linux PC that will ...

C#: get information about computer in domain

What classes should I use in C# in order to get information about a certain computer in my network? (Like who is logged on that computer, what Operating System is running on that computer, what ports are opened etc) ...

Double system call to write() causes massive network slowdown

In a partially distributed network app I'm working on in C++ on Linux, I have a message-passing abstraction which will send a buffer over the network. The buffer is sent in two steps: first a 4-byte integer containing the size is sent, and then the buffer is sent afterwards. The receiving end then receives in 2 steps as well - one call...

Where are these IP addresses coming from?

#include <stdio.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <arpa/inet.h> int main(int argc, char *argv[]) { //set up hints struct addrinfo hints; struct addrinfo *res; struct sockaddr their_addr; socklen_t sin_size = sizeof their_addr; ...

What is the best script language for n/w programming + web development

Hi, I'm interested in developing web application and networking application. For that what is the best script language to learn. Which one is effective for this two. So for, i don't know even a single syntax of any scripting language. Which is the best script for understanding, maintainable, effective and simple (may not). Please d...

Can UDP (unicast client) recvfrom() other servers other than the one sendto()?

I am creating a UDP socket client in C (unicast) and is wondering why recvfrom() has a struct sockaddr * argument in which in the man page says, A null pointer, or points to a sockaddr structure in which the sending address is to be stored. Is it possible that I could receive a message from a different server other than the one I sen...

How to prevent network ports being left open on program crash

I took Computer Networking last semester and did some C programming in linux (using gcc) for my projects. One extremely tedious thing I kept running into was if my program crashed or stalled (which I then would have to hit Ctrl+C to kill it), the network port would still be left open for a minute or so. So if I wanted to immediately run ...

Is the select() wrapper in IO::Select thread-safe? How to work around?

Let's say I have a thread: sub new { my $class = shift; my $self = ref $class || $class; bless { 'read_set' => IO::Select->new, 'write_set' => IO::Select->new, 'error_set' => IO::Select->new }, $self; } sub start { my $self = shift; $self...

Why is my UDPClient null once in a while

Can someone explain to me why this code fails once in a while with a null exception for udpLink while sending? udpLink = new UdpClient(ipAddress, 514); using (udpLink) { udpLink.Send(rawMsg, rawMsg.Length); } This is the new code on how I fixed it. udpLink ...

Comparing strings in C - strcmp

I'm having trouble comparing strings in C (with which I am fairly new to). I have socket on this server application waiting to accept data from a client. In this particular portion of my program I want to be able to execute a MySQL query based on the data received from the client. I want to be able to know when the received data has the ...

What is the BSD (or portable) way to get ToS byte (like IP_RECVTOS from linux)?

What is the right (portable, stable) way to get the ToS byte of a received packet? I'm doing UDP with recvmsg() and on linux I can get the ToS if I setsockopt() IP_RECVTOS/IPV6_RECVTCLASS, but IP_RECVTOS doesn't seem to be available on my BSD systems. What is the right way to do this? I primarily want this to work on the BSDs and Solari...

How can I loop through an IP address range?

I want to perform a set of network tasks on an IP address range. As soon as the range is getting bigger than a class c network, I fail to enumerate all hosts in the range. I want to be able to iterate through all hosts of a network with the netmask 255.255.240.0. From: 192.168.0.100 To: 192.168.10.100 How would one approach this? ...

How does _XPG4_2 and other defines work on Solaris?

On Solaris, in order to get the msg_control field in struct msghdr and have IPV6_TCLASS I seem to need to define _XPG4_2 and __EXTENSIONS__. It seems to work if I just define these to 1 before including anything: #if defined (__SVR4) && defined (__sun) # define _XPG4_2 1 # define __EXTENSIONS__ 1 #endif Should I do it this way? Do I...

Rewriting Binary Streams using Java

I have been studying Netty and Mina but am confused as to the best way to rewrite binary streams. For example, I would like to create a proxy that will allow for replacement of XML and forward along. Examples appreciated. ...

how to detect datacard connect and disconnect event on win32

Hi All, I have a data card, as soon as i insert the data card, i am getting the events by using wm_device_change event. But I also want to get event, when my data connect actually connects to out side world. I mean to say, as soon as we click on connect/disconnect button of data card,i want to get the event. exactly speaking wanted t...

Functions to manipulate IPv4 addresses in C#?

Given a IPv4 address in the form of a string (ex. "10.171.24.69") and a netmask (ex. "255.255.255.128" or "25" for number of bits in network part) I need to compute the broadcast address, which may be by either zeroing or one-ing the bits in the host part (depending on the IPUseZeroBroadcast property which I can query via WMI). I'm exam...

is there any SDK provided by microsoft for network application development

Hi all, I am writing a Network program, and i am using NP_ENUM_NETWORK in my win32 application. when i serach in my system i am not able to locate this enum can i know in which header file, i wil get this enum. is there any SDK provided by microsoft for network application development where i can get this enum. with regards Vinayak...

Resource temporarily unavailable in Boost ASIO

I get the error message "Resource temporarily unavailable" when I use the method receive_from(), it's a member of ip::udp::socket located here. I pass to it: boost::asio::buffer, pointer to an endpoint object, flags (set to zero), and an error_code object. I create the endpoint with just new udp::endpoint() There doesn't seem to...