Question

Locked

Programming trouble..

By raj ·
I have written a program to let a user select which of his available network interfaces to send a UDP message out of to broadcast for specific industry hardware with a microcontroller. The code is written in Java and I am using Jpcap API and Winpcap. I have 2 different interfaces on my computer, one is an Intel Pro 1000 GT and the other is a Belkin usb 10/100 ethernet adapter. They are both plugged in to the same 8 port switch on the same network. The problem is that when I run my program and use the Belkin it works fine (I am spying on the network with Wireshark) but the Intel creates an ICMP message type 3 code 3 with every message it gets from a microcontroller it finds. I am able to process the messages from both adapters but the ICMP messages from the Intel are slowing down the communication between me and the micros,making the program unusable. I cannot figure out why the Intel cannot find the port and the Belkin can when they are running off the same code and sending and recieving the same messages.Anyone have any suggestions? I can supply code if necessary but it is just basic Java Jpcap UDP communications stuff. Help!!

Ray Jaramillo

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

ICMP TYPE NUMBERS

Registries included below:
- ICMP Type Numbers
- Code Fields
- ICMP Extension Objects Classes


The Internet Control Message Protocol (ICMP) has many messages that
are identified by a "type" field.

Type Name Reference
---- ------------------------- ---------
0 Echo Reply [RFC792]
1 Unassigned [JBP]
2 Unassigned [JBP]
3 Destination Unreachable [RFC792]
4 Source Quench [RFC792]
5 Redirect [RFC792]
6 Alternate Host Address [JBP]
7 Unassigned [JBP]
8 Echo [RFC792]
9 Router Advertisement [RFC1256]
10 Router Solicitation [RFC1256]
11 Time Exceeded [RFC792]
12 Parameter Problem [RFC792]
13 Timestamp [RFC792]
14 Timestamp Reply [RFC792]
15 Information Request [RFC792]
16 Information Reply [RFC792]
17 Address Mask Request [RFC950]
18 Address Mask Reply [RFC950]
19 Reserved (for Security) [Solo]
20-29 Reserved (for Robustness Experiment) [ZSu]
30 Traceroute [RFC1393]
31 Datagram Conversion Error [RFC1475]
32 Mobile Host Redirect [David Johnson]
33 IPv6 Where-Are-You [Bill Simpson]
34 IPv6 I-Am-Here [Bill Simpson]
35 Mobile Registration Request [Bill Simpson]
36 Mobile Registration Reply [Bill Simpson]
37 Domain Name Request [RFC178
38 Domain Name Reply [RFC178
39 SKIP [Markson]
40 Photuris [RFC2521]
41 ICMP messages utilized by experimental [RFC4065]
mobility protocols such as Seamoby
42-255 Reserved [JBP]

Many of these ICMP types have a "code" field. Here we list the types
again with their assigned code fields.

Type Name Reference
---- ------------------------- ---------
0 Echo Reply [RFC792]

Codes
0 No Code

1 Unassigned [JBP]

2 Unassigned [JBP]

3 Destination Unreachable [RFC792]

Codes
0 Net Unreachable [RFC792]
1 Host Unreachable [RFC792]
2 Protocol Unreachable [RFC792]
3 Port Unreachable [RFC792]
4 Fragmentation Needed and Don't [RFC792]
Fragment was Set [RFC792]
5 Source Route Failed [RFC792]
6 Destination Network Unknown [RFC1122]
7 Destination Host Unknown [RFC1122]
8 Source Host Isolated [RFC1122]
9 Communication with Destination [RFC1122]
Network is Administratively Prohibited
10 Communication with Destination Host is [RFC1122]
Administratively Prohibited
11 Destination Network Unreachable for Type [RFC1122]
of Service
12 Destination Host Unreachable for Type of [RFC1122]
Service
13 Communication Administratively Prohibited [RFC1812]
14 Host Precedence Violation [RFC1812]
15 Precedence cutoff in effect [RFC1812]


4 Source Quench [RFC792]

Codes
0 No Code

5 Redirect [RFC792]

Codes
0 Redirect Datagram for the Network (or subnet)
1 Redirect Datagram for the Host
2 Redirect Datagram for the Type of Service and Network
3 Redirect Datagram for the Type of Service and Host

6 Alternate Host Address [JBP]

Codes
0 Alternate Address for Host

7 Unassigned [JBP]

8 Echo [RFC792]

Codes
0 No Code

9 Router Advertisement [RFC1256]

Codes
0 Normal router advertisement
16 Does not route common traffic [RFC2002]


10 Router Selection [RFC1256]

Codes
0 No Code

11 Time Exceeded [RFC792]

Codes
0 Time to Live exceeded in Transit
1 Fragment Reassembly Time Exceeded

12 Parameter Problem [RFC792]

Codes
0 Pointer indicates the error
1 Missing a Required Option [RFC110
2 Bad Length


13 Timestamp [RFC792]

Codes
0 No Code

14 Timestamp Reply [RFC792]

Codes
0 No Code

15 Information Request [RFC792]

Codes
0 No Code

16 Information Reply [RFC792]

Codes
0 No Code

17 Address Mask Request [RFC950]

Codes
0 No Code

18 Address Mask Reply [RFC950]

Codes
0 No Code

19 Reserved (for Security) [Solo]

20-29 Reserved (for Robustness Experiment) [ZSu]

30 Traceroute [RFC1393]

31 Datagram Conversion Error [RFC1475]

32 Mobile Host Redirect [David Johnson]

33 IPv6 Where-Are-You [Bill Simpson]

34 IPv6 I-Am-Here [Bill Simpson]

35 Mobile Registration Request [Bill Simpson]

36 Mobile Registration Reply [Bill Simpson]

39 SKIP [Markson]

40 Photuris [RFC2521]

Codes
0 = Bad SPI
1 = Authentication Failed
2 = Decompression Failed
3 = Decryption Failed
4 = Need Authentication
5 = Need Authorization

41-252 Unassigned

253 RFC3692-style Experiment 1 (*) [RFC4727]
254 RFC3692-style Experiment 2 (*) [RFC4727]

(*) It is only appropriate to use these values in explicitly-
configured experiments; they MUST NOT be shipped as defaults in
implementations. See RFC 3692 for details.

ICMP Extension Objects Classes and Class Sub-types - per [RFC4884]
Registration Procedures:
0-246 First Come First Serve
247-255 Private Use

Object
Class
Value Class Name Reference
------ -------------------------- ---------
1 MPLS Label Stack Class [RFC4950]

Sub-types [RFC4950]
C-Type
0 Reserved [RFC4950]
1 Incoming MPLS Label Stack [RFC4950]
0x02-0xF6 Available for assignment [RFC4950]
0xF7-0xFF Reserved for private use [RFC4950]

Allocation Policy: C-Type values for Class-num 1 are
assignable on a first-come-first-serve (FCFS) basis
[RFC2434].



REFERENCES
----------
[RFC792] Postel, J., "Internet Control Message Protocol", STD 5,
RFC 792, USC/Information Sciences Institute, September 1981.

[RFC950] Mogul, J., and J. Postel, "Internet Standard Subnetting
Procedure", STD 5, RFC 950, Stanford, USC/Information
Sciences Institute, August 1985.

[RFC110 Kent, S., "U.S. Department of Defense Security Options for
the Internet Protocol", RFC 1108, November 1991.

[RFC1122] R. Braden, Ed., "Requirements for Internet Hosts --
Communication Layers", RFC 1122, October 1989.

[RFC1256] Deering, S., Editor, "ICMP Router Discovery Messages",
RFC 1256, Xerox PARC, September 1991.

[RFC1393] Malkin, G., "Traceroute Using an IP Option", RFC 1393,
Xylogics, Inc., January 1993.

[RFC1475] Ullmann, R., "TP/IX: The Next Internet", RFC 1475, Process
Software Corporation, June 1993.

[RFC178 W. Simpson, "ICMP Domain Name Messages", RFC 1788, April 1995.

[RFC1812] Baker, F., "Requirements for IP Version 4 Routers", RFC 1812,
Cisco Systems, June 1995.

[RFC2002] C. Perkins, Editor, "IP Mobility Support", RFC 2002,
October 1996.

[RFC2434] T. Narten and H. Alvestrand, "Guidelines for Writing
an IANA Considerations Section in RFCs", RFC 2434, October 1998.

[RFC2521] P. Karn and W. Simpson, "ICMP Security Failures Messages",
RFC 2521, March 1999.

[RFC4065] J. Kempf, "Instructions for Seamoby and Experimental
Mobility Protocol IANA", RFC 4065, July 2005.

[RFC4727] B. Fenner, "Experimental values In IPv4, IPv6, ICMPv4, ICMPv6,
UDP and TCP Headers", RFC 4727, November 2006.

[RFC4884] R. Bonica, D. Gan, P. Nikander, D. Tappan and C. Pignataro,
"Extended ICMP to Support Multi-part Messages", RFC 4884,
April 2007.

[RFC4950] R. Bonica, D. Gan, D. Tappan and C. Pignataro, "ICMP Extensions for
MultiProtocol Label Switching", RFC 4950, August 2007.
.........................................

Thanks to:
[JBP] Jon Postel, <postel&isi.edu>, September 1995.
[David Johnson]
[Markson] Tom Markson, <markson&osmosys.incog.com>, September 1995.
[Simpson] Bill Simpson, <Bill.Simpson&um.cc.umich.edu>, October 1995.
[Solo]
[ZSu] Zaw-Sing Su <ZSu&TSCA.ISTC.SRI.COM>

Please post back if you have any more problems or questions.
If this info is useful, please mark it helpful. Thanks

Collapse -

Still need help...

by raj In reply to ICMP TYPE NUMBERS

I mentioned that it is a type 3 code 3 ICMP message in my last post. I know the type of message I just do not know why one network interface sends it and one does not. For some reason the Intel interface has this problem.
"When the designated transport protocol (e.g., UDP) is unable to demultiplex the datagram but has no protocol mechanism to inform the sender." But the Belkin interface does not and they are both running the same code. I am perplexed.
Thanks for any help.

Collapse -

Maybe you can not run the same code on two different devices...

At the same time. Due to clashing with the networks with the same code on different devices will bring up an error such as yours. Have you tried just using just one network to do the code in question and if you have/had does it work well?.

Please post back if you have any more problems or questions.
If this info is useful, please mark it helpful. Thanks

Collapse -

Even running seperately...

by raj In reply to Maybe you can not run the ...

Even when the Belkin is unplugged the Intel(which is installed) still produces the ICMP messages. If I turn the Intel off and just run the Belkin it works fine still.Same Network,individually connected or both connected to the network at the same time, the Intel produces the ICMP message for every message from the micro and the Belkin doesn't. The program I am running just lets you choose which interface sends the message to the micro, then it waits for a reply.

Thank you again for your help.

Back to Software Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums