Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,168 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,886 people online right now. Registration is fast and FREE... Join Now!




C Socket Programming

 
Reply to this topicStart new topic

C Socket Programming

Nam3kaTh
18 Dec, 2007 - 09:12 PM
Post #1

New D.I.C Head
*

Joined: 7 Dec, 2007
Posts: 4


My Contributions
Hello,

I was wondering if there is a way to develop applications that would be able to work through DHCP on both the host and client? Let me explain, see I want to build a point-to-point application that would not require port forwarding knowledge.

My original idea was to have both parties input the recipients ip address and a desired port and then the sender would begin sending an ACK packet while the receiver would simultaneously be broadcasting a SYN-esk packet and in theory both routing tables would anticipating a packet from their respective hosts, thus allowing a transmission to begin. (Similar to packet spoofing but for legitimate use)

Would this theoretically work or is there a better approach to this?

I'm attempting to write this in C and developing it for Windows XP/Vista.

Any help would be greatly appreciated.

This post has been edited by Nam3kaTh: 18 Dec, 2007 - 09:18 PM
User is offlineProfile CardPM
+Quote Post

snoj
RE: C Socket Programming
18 Dec, 2007 - 09:17 PM
Post #2

$Null
Group Icon

Joined: 31 Mar, 2003
Posts: 3,304



Thanked: 6 times
Dream Kudos: 700
My Contributions
Good idea (I think), but you'd also have to know what (if any) a firewall is doing to the packets in between.

Typically home routers/firewalls these days use PAT (Port Address Translation). This means that a port open on a computer and the port the firewall uses can (and often are) different.
User is offlineProfile CardPM
+Quote Post

Nam3kaTh
RE: C Socket Programming
18 Dec, 2007 - 09:23 PM
Post #3

New D.I.C Head
*

Joined: 7 Dec, 2007
Posts: 4


My Contributions
QUOTE(snoj @ 18 Dec, 2007 - 10:17 PM) *

Good idea (I think), but you'd also have to know what (if any) a firewall is doing to the packets in between.

Typically home routers/firewalls these days use PAT (Port Address Translation). This means that a port open on a computer and the port the firewall uses can (and often are) different.


Hum, definitely a step in the right direction, perhaps monitoring connections and detecting and relaying changes, that may become tedious to code and more so perfect
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/2/08 12:21AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month