I'm working on a project for a networking course at the university i attend. We are supposed to write an app than works like a gateway for ipv4 datagram packets to be repackaged to ipv6 datagram packets(should be in java).My initial thinking was: Use java get methods to pull apart the datagram, then construct a new datagram packet(making whatever changes necessary) using the data we pulled from the ipv4 packet.
What we have access to via the Datagrampacket class methods are data, address, length, offset and port. Which means we dont get the juicy stuff like version, header length, type of service, identifier etc. Additionally it seems there is no constructor in this class to create a datagram packet given we manage to extract the required feilds.
Basically i'm looking for a bit of direction from this point.
20 replies to this topic
#1
Posted 05 November 2010 - 05:04 AM
Perfection of means and confusion of ends seem to characterize our age. Albert Einstein :confused:
|
|
|
#2
Posted 07 November 2010 - 06:12 PM
;). I need some help guys. still a bit lost
Perfection of means and confusion of ends seem to characterize our age. Albert Einstein :confused:
#3
Posted 08 November 2010 - 04:47 AM
Since Java classes does not include methods to isolate each section of a datagrampackdt. I'm thinking now since a datagram is made up of bits, if it would be feasible to develop a class to separate the packet into sequential bits. Taught: i should be able to reassemble each section individually.
Perfection of means and confusion of ends seem to characterize our age. Albert Einstein :confused:
#4
Posted 09 November 2010 - 05:42 AM
I'm not really into network programming, but what would happen if you change the ipv4 address into an ipv6 one of the DatagramPacket class? (packet.setAddress(Inet6Address.getByName(host) )
I know the header of a ipv4 and ipv6 packet differ.. but i hope that since you can't get or set those with methods the class has some built in features to adapt those to the address that's given.
.. is there an easy way to test this kind of stuff?
I know the header of a ipv4 and ipv6 packet differ.. but i hope that since you can't get or set those with methods the class has some built in features to adapt those to the address that's given.
.. is there an easy way to test this kind of stuff?
#5
Posted 09 November 2010 - 08:58 AM
I am doing a lot of googling and i've just started reading the rfc's. But i didn't find anything to test thus far.
this is how the ipv4 datagram looks
The IP datagram structure.
I need to extract every field, then construct an ipv6 packet
What i've done so far is break the datagram into bits. But i suspect corruption or alteration of the bits particulary with toString() . I would post the code in a while with hope than the java guru's on codecall could help with the tidying up.
packet.setAddress(Inet6Address.getByName(host) )would set the IP address of the machine to which this datagram is being sent.
this is how the ipv4 datagram looks
The IP datagram structure.
I need to extract every field, then construct an ipv6 packet
What i've done so far is break the datagram into bits. But i suspect corruption or alteration of the bits particulary with toString() . I would post the code in a while with hope than the java guru's on codecall could help with the tidying up.
Perfection of means and confusion of ends seem to characterize our age. Albert Einstein :confused:
#6
Posted 09 November 2010 - 09:32 AM
I'm having examn tomorrow and friday, but after that i got a whole week to freak out on this :D
I found this book on google books which seems to be quite interesting.
At page 426 it also says that with pure Java code you can't access the header fields apart from source, destination, port, data, length of data.
So it'll either has to work with the bit splitting, or else you need an external library
Java network programming - Google Books
I found this book on google books which seems to be quite interesting.
At page 426 it also says that with pure Java code you can't access the header fields apart from source, destination, port, data, length of data.
So it'll either has to work with the bit splitting, or else you need an external library
Java network programming - Google Books
#7
Posted 10 November 2010 - 12:55 PM
I think an external library would do the trick, if such is available. And another thing: after the packet is broken down to bits , if we manage to read the data correctly i have to construct an ipv6 packet from that data. Really tired!:crying:
Question: when i make a packet with java using one of the constructors, is there a way to tell if its an ipv4 or ipv6?
Question: when i make a packet with java using one of the constructors, is there a way to tell if its an ipv4 or ipv6?
Perfection of means and confusion of ends seem to characterize our age. Albert Einstein :confused:
#8
Posted 10 November 2010 - 01:35 PM
I actually still believe in the fact that changing the InetAdress will be enough and Java takes care of anything else ^^
#9
Posted 14 November 2010 - 07:25 AM
Im giving it some taught. I will post something back very soon.
Perfection of means and confusion of ends seem to characterize our age. Albert Einstein :confused:
#10
Posted 16 November 2010 - 05:56 AM
I have a few midterm exams on my chest today and tomorrow. Once i done ill jump back in :)
Perfection of means and confusion of ends seem to characterize our age. Albert Einstein :confused:
#11
Posted 17 November 2010 - 11:52 AM
Given the deadline for submission, my lecturer is allowing me to do a simulation of the conversion instead of the actual conversion. So I'm thinking of building a GUI application thats show the transition from ipv4 to ipv6.
Perfection of means and confusion of ends seem to characterize our age. Albert Einstein :confused:
#12
Posted 17 November 2010 - 01:08 PM
So you just have to visualise the ipv4 header and move the parts of the header into a new ipv6 header? O.0
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









