network-programming

AF_INET for IPC in windows

I wish to know that If protocol family AF_INET is used for local communication (IPC) in windows systems. (with loopback interface) will it be able to give performance same as AF_UNIX in unix. I tried for Named pipe in windows but it doesn't seems to me working for my case. AF_INET when used it will go through the TCP/IP stack. which wil...

Windows Named Pipe Support in Linux

I'm looking at a project which will require inter-process communication between a legacy Windows application using named pipes, and a new service running on a Linux server. The windows application cannot be changed. Does anyone know if there is a Linux library available that supports Windows named pipes? Or even better, can anyone recomm...

How do I re-route network traffic using Python?

Small apps like Freedom and Anti-social have created quite a stir lately. They cut you off from the internet either entirely or just block social networking sites in order to discourage procrastination and help you exert self control when you really want to get some work done. I looked at the available options and also at some Google Ch...

Optimum Update frequency for a client server based multiplayer game

I am making a multiplayer game in c++ : The clients simply take commands from the users, calculate their player's new position and communicate it to the server. The server accepts such position updates from all clients and broadcasts the same about each to every. In such a scenario, what parameters should determine the time gap between ...

Sniffing detection

Hi, Can someone tell me how exactly works "test ICMP"? (One of methods to detect sniffing in local network) ...

How send raw ethernet packet with C#?

Hi, Is there a way to send raw packet Ethernet to other host via C#? In Windows 7 if it makes difference. ...

Unable to create a ServerSocket in eclipse (java)

Hi, i am very new to programming in java however have a lot of experience in .NET (c# & vb.net). I am trying to create a new instance of a serversocket class in eclipse IDE and when i type the following code it is giving me an "Unhandled exception type IOException" and i havent even tried to run the code yet!! I dont understand how my...

What are best practices of designing and implementing Network Protocols?

For the first time I'm trying to implement some Network Protocol over TCP/IP. I've designed one but I'm not sure if it's efficient. Design So here is my idea: after client opening TCP/IP connection with server, every time it wants to make request, first of all it sends size of request followed by some separator character (new line or s...

Simple Game networking engine /library/API in java?

Dear All I would like to ask if somebody know/share his knowledge about some "SIMPLE" game networking engine/library/API written in java, which i can use to develop Real-time multiplayer game/simulation, i googled BUT only getting from c++ and only one or two in java, which have various trade-offs like complexity of use and dependencie...

EAGAIN Error: Using Berkeley Socket API

Hi, Sometimes when I try to send some packets continuously( I am using the send() API ) I receive this error. Now I am not sure what should I do than. I have these questions: 1) Can I re-send again ? If yes then after how much time should I try again. Is there any particular strategy to be followed 2) Is buffer size has exceeded its l...

Memory Management and Exception Handling

Hello, I have a simple class that handles the connection being made between a client and server. To let more than one user communicate with the server at one time each new Client connection is made on a separate thread. In this class I create two streams that act as the inbound and outbound streams for the client. I create the fields ...

Test for Low bandwidth Networks

Hi I have made a game and I have used OpenGL for its graphics.the OS is ubuntu 10.04. The game is multiplayer.For its testing I am unable to find any tool/software for low bandwidth and high latency.I mean I want to find the appropriate network conditions so as to run my game ! Can sm1 please tell me any good links to go to !!!!or any s...

how to bind raw socket to specific interface

Hello, My application is running on CentOS 5.5. I'm using raw socket to send data: sd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); if (sd < 0) { // Error } const int opt_on = 1; rc = setsockopt(m_SocketDescriptor, IPPROTO_IP, IP_HDRINCL, &opt_on, sizeof(opt_on)); if (rc < 0) { close(sd); // Error } struct sockaddr_in sin; memset(&si...

How to get netmask?

I know how to get from ifconfig. (linux) But is there another way? Can found it in socket. ...

Basic P2P / Port / Security Question

I'm building an app that allows a user to stream a video from their home computer. Where can I find more information about how I can make this stream accessible to users outside of the broadcaster's local network? Let's say I'm broadcasting the video from 192.168.0.1:8080/video.mpg I know that if I setup port forwarding to the broadca...

EOF faults and keep alive

Hi, I have a SOAP server process that fails with "EOF" errors. Does anybody know if EOF faults are related with keep alive timeouts? If yes how? My code is in C/C++ ...

How to put NIC into promiscuous mode?

Hi I want to put my NIC into promiscuous mode. Why? Because I wrote app which is able potentially to detect sniffing in my local network (send modyfied appropriately ethernet packets). I just want now check it out, so in my second comp I want to set up promisc mode. There's Windows 7 and simply Dell Wireless 1397 WLAN Mini-Card...if it...

how to determinate destination MAC address

My application is running on CentOS 5.5 I need to send raw packets using libpcap API: pcap_inject() or pcap_sendpacket() To the specific IP address How can I determinate MAC address belongs to a specific target? ...

How broadcast ping works?

Hi Can someone tell me why when I send broadcast ICMP Request, only router send me ICMP Reply? Even if I modify MAC destination of this ICMP Request (original is FF:FF:FF:FF:FF:FF) to MAC specific host (IP still broadcast that local network ...it still don't send me Reply. Why? ...

List of all hosts on LAN network

How can I get all the IP addresses and associated host names in a LAN? ...