network-protocols

inet_addr function and leading zeros

Hi, I'm trying to use the 'inet_addr' function to convert a char IP address, but I think since the IP Address i'm passing in to the 'inet_addr' function has leading zero's (192.169.055.075), the 'inet_addr' function is interpreting this differently. Any suggestion on how to remove the leading zeros? Thanks char IPAddr[20]; //192.169.05...

Big endian or Little endian on net?

In what byte order does data transfer occur on net? Is it Little Endian or big endian? How is it converted to the respective byte order once the data reaches the host ? ...

Problem when creating Asynchronous Pluggable Protocol on Vista

Hello, I have created a tutorial for creating a dzone protocol (so that I can type dzone:n in firefox to get the new links for example), it works great but when at the end I want to create a new alias protocol dn which points to the same handler, Vista doesn't want to take this new path though registry entry is ok (I check by renaming d...

Parsing a variable-length message

I am implementing the BitTorent protocol using Java via this spec. In the messages section all messages are fixed length except 2 of them; for one of them it's the only variable message after the handshake so I can check others and assume it's a piece message when no other messages met. But for the following message bitfield: <len=0001...

Bluetooth Protocol?

Ok, this might just be a dumb question, but I was wondering if Bluetooth follows TCP or UDP protocol? From my knowledge of network protocols (which isn't much), I would say that it doesn't follow either of those two and that there is some kind of specific bluetooth protocol that exist. I have one more question...what protocol does the bl...

Should I use #defines or enums for commands over network?

I have to transfer some values to be used as commands over the network, and I wish to make it as efficient and robust as possible, i.e. I need opinions on what to use for these commands, #defines or enums? The range of commands shall not be more than 20 commands(lets say 40 with every defined response to the command), so according to mo...

How is the Protocol Attribute set for IP Fragments?

I am testing a network device driver's ability to cope with corrupted packets. The specific case I want to test is a when a large TCP packet is fragmented along the path because of smaller MTU in the way. What most interests me about the IP Fragmentation of the large TCP packet is, is the protocol attribute of the IP Fragment packet set...

Why no "what's my ip" well-known port/service?

I know there are some web sites that provide this service but given that pretty much everyone lives behind NAT these days, why isn't this standardized on a port and provided as a service to whomever wants to run it? It's at least as useful as an echo, daytime or "quote of the day" server and as easy to implement. Or does one exist that...

Develop a network layer protocol in C

I wish to develop a custom network layer protocol. I suppose it can be done using C. Can any one suggest how to begin with. Any references or sample code would be of great help. ...

embedded testing to protocol stack development

Hi All, I am now working in embedded testing domain(avionics) and i would like to shift over my carreer to something like developement which is mainly like Protocol stack development. So what i need to know is some kind of real time projects (Networking or protocol development) which i could put into my resume so that the recruiter can ...

Read from socket: Is it guaranteed to at least get x bytes?

I have a rare bug that seems to occur reading a socket. It seems, that during reading of data sometimes I get only 1-3 bytes of a data package that is bigger than this. As I learned from pipe-programming, there I always get at least 512 bytes as long as the sender provides enough data. Also my sender does at least transmit >= 4 Bytes ...

Which Protocol is best for File Transfer.

What is the best protocol I can use to transfer a Big file, Which should be fast and reliable. it might have low bandwidth systems i need a file transmition across the india.the file size may be 100 to 500MB ...

How do I test my TCP protocol app?

When creating apps that interface on various TCP protocols (apart from HTTP), we need to test our app and how it communicates with a real server. Now typically with shared hosting you can't install any low level service to talk protocols like POP3, IMAP for email, SIP or XMPP and for instant messaging. So are there "test" servers that ...

How to establish ethernet connection between laptop and embedded device

I'm designing a device which will be connected to a computer using ethernet. It already has a mac controller built in. When I attach the device, all that happens is the computer broadcasts a bunch of DHCP discover packets and some other packets I guess in an attempt to find the device and establish the connection. I assume I need to make...

Security implications to be aware of when writing a lightweight network file transfer protocol

I have a desktop application that will 'sync' with an iPhone application. The sync is actually a simple file copy — the iPhone app is a viewer, so I don't have to deal with the complexities of actually syncing the data in a two-way manner. I've written my own protocol since I need it to be lightweight, and I'm sending files that may be...

Best Practice: generating and parsing network packets for a known protocol in C#?

I tried asking a similar question recently however after several answers I realized it wasn't the correct thing to ask. Is there a guide or a generally accepted practice for generating and parsing network packets based on an existing protocol like SMPP (Short Message Peer-to-Peer Protocol [Used for SMS Messages]) or various chat protoco...

Overhead with PPP and Ethernet

What is the overhead for PPP and Ethernet sending 5000 bytes? Frame size for Point-to-Point Protocol: 8 bytes MTU: 500 bytes Frame size for Ethernet: 18 bytes MTU: 1500 bytes Both sending 5000 bytes.. I know this is just a calculation, but I am not sure how to do it. I can't find it anywhere. I would think that since a PPP frame take...

Identify User and Machine

I my company we use small application called IPMsg a messenger kind of tool to pass messages and file to other fellows in company, even it allows to multicast the message. And also it list the Username, hostname and IP addresses of users. How it could do that? There is no server present for message routing and when checked through nets...

Textual Protocol which is not a regular language ?

Hi, The usual way to represent way the grammar associated with a textual network protocol is using ABNF. Just like any EBNF-related meta-syntax, ABNF enables to describe context-free grammars. These context-free grammars can represent a non-regular language, right ? The usual way to implement a network stack is developing a state ma...

How do I go about reverse engineering a UDP-based custom game protocol with nothing other than Wireshark?

How do I go about reverse engineering a UDP-based custom game protocol with nothing other than Wireshark? I can log a bunch of traffic, but then what? My goal is to write a dissector plugin for Wireshark that will eventually be able to decode the game commands. Does this seem feasible? What challenges might I face? Is it possible the com...