Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

check / Scan a port

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> EASY TCP/IP
View previous topic :: View next topic  
Author Message
Arera

Bascom Member



Joined: 23 Sep 2007
Posts: 386
Location: Wuppertal, Germany

germany.gif
PostPosted: Fri Mar 08, 2013 12:35 pm    Post subject: check / Scan a port Reply with quote

Hi,
I'm using the WIZ820IO to send messages to a couple of destinations, via UDP and as TCP client.

By socketconnecting to the TCP server, I can find out if the server accepts the message by checking the result of socketconnect.

But what about UDP?
I can ping the destination IP, but that still does not say if the port is open.
Is there way to determin, if destination-port is open?
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5916
Location: Holland

blank.gif
PostPosted: Fri Mar 08, 2013 2:22 pm    Post subject: Reply with quote

UDP is a connectionless protocol. So you never know if your data arrives. Only if you get an answer. But then you are making some kind of protocol.
UDP is good for raw data since it has less overhead. But for own development i would advise to use TCP.

_________________
Mark
Back to top
View user's profile Visit poster's website
MAK3

Bascom Member



Joined: 24 Sep 2010
Posts: 449
Location: Germany

germany.gif
PostPosted: Fri Mar 08, 2013 4:14 pm    Post subject: Reply with quote

Hi Arera,

I have written some Getting started here:
http://wiki.mcselec.com/MCS_Wiki_Main_entry

Maybe you can add your findings.

MAK3
Back to top
View user's profile
Arera

Bascom Member



Joined: 23 Sep 2007
Posts: 386
Location: Wuppertal, Germany

germany.gif
PostPosted: Sat Mar 09, 2013 10:50 am    Post subject: Reply with quote

I m bound to udp, because it is standard for professional syslogging software.
I am not a network expert, but there are programs available to check open ports on a pc (portscanners). My idea is to build a portscanner to find out, if the desination port is open.
At this point my knowledge ends, so I hoped to find some ideas here!
Ben, evert and many others seem to know quite everything. Go ahrad, think!!!
Very Happy
Back to top
View user's profile
MAK3

Bascom Member



Joined: 24 Sep 2010
Posts: 449
Location: Germany

germany.gif
PostPosted: Sat Mar 09, 2013 11:36 am    Post subject: Reply with quote

Hi,

Quote:
I m bound to udp, because it is standard for professional syslogging software.

Then you need to dig into the datasheet of W5200 and search for IPRAW and ICMP.

Ping for example is also ICMP: "The ‘ping’ of ICMP or IGMP v1/v2 is already included in W5200 by hardware logic."

See also: http://en.wikipedia.org/wiki/Port_scanner#UDP_scanning
MAK3
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5916
Location: Holland

blank.gif
PostPosted: Sat Mar 09, 2013 10:23 pm    Post subject: Reply with quote

Thanks for your tutorials MAK3, i recently got a wiz820 Smile. So it is good to have this info clearly presented.

About UDP : ping is essentially a protocol too : you send some data and when it is received by the host, it will send some data back.
But most servers have ports blocked or a stealth mode where they simply do not answer.
So my point is still that you can not know if a server is active, listening or whatever unless there is some protocol that uses UDP.
You should check the protocol for your equipment.

_________________
Mark
Back to top
View user's profile Visit poster's website
six1

Bascom Expert



Joined: 27 Feb 2009
Posts: 553

germany.gif
PostPosted: Sun Mar 10, 2013 10:42 am    Post subject: Reply with quote

not possible to scan Ports on UDP if you don't know exactly, what the Server does! (if you know details from how the server works, there is a little chance!)

http://de.wikipedia.org/wiki/Portscanner

UDP Scan
Ein direkter Scan von UDP Ports ist nicht möglich, da das Protokoll verbindungslos arbeitet.

_________________
For technical reasons, the signature is on the back of this message.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> EASY TCP/IP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum