Your SlideShare is downloading. ×
0
IPV4_IPV6_INTEROPERABILITY_
IPV4_IPV6_INTEROPERABILITY_
IPV4_IPV6_INTEROPERABILITY_
IPV4_IPV6_INTEROPERABILITY_
IPV4_IPV6_INTEROPERABILITY_
IPV4_IPV6_INTEROPERABILITY_
IPV4_IPV6_INTEROPERABILITY_
IPV4_IPV6_INTEROPERABILITY_
IPV4_IPV6_INTEROPERABILITY_
IPV4_IPV6_INTEROPERABILITY_
IPV4_IPV6_INTEROPERABILITY_
IPV4_IPV6_INTEROPERABILITY_
IPV4_IPV6_INTEROPERABILITY_
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

IPV4_IPV6_INTEROPERABILITY_

31

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
31
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Presented by R P Porwal
  • 2. contents  Introduction  IPv4 Client, IPv6 Server  IPv6 Client, IPv4 Server  IPv6 Address Testing Macros  IPV6_ADDRFORM Socket Option  Source Code Portability
  • 3. Introduction  Server and client combination  IPv4 <=> IPv4(most server and client)  IPv4 <=> IPv6  IPv6 <=> IPv4  IPv6 <=> IPv6  How IPv4 application and IPv6 application can communicate with each other.  Host are running dual stacks, both an IPv4 protocol stack and IPv6 protocol stack
  • 4. IPv4 Client , IPv6 Server  IPv6 dual stack server can handle both IPv4 and IPv6 clients.  This is done using IPv4-mapped IPv6 address  server create an IPv6 listening socket that is bound to the IPv6 wildcard address
  • 5. IPv6 client IPv6 server TCP IPv6 Data link Data link IPv4 TCP IPv4 client TCP IPv4 IPv6 Data link Enet hdr IPv4 hdr TCP hdr TCP data Enet hdr IPv4 hdr TCP hdr TCP data Type0800 Type0800 Dport 8888 Dport 8888 206.62.226.42 IPv4 mapped IPv6 address IPv6 listening socket, bound to 0::0, port 8888 IPv6 address 5flb:df00:ce3 e:e200:20:80 0:2b37:6426
  • 6. IPv4 datagram IPv6 datagram AF_INET SOCK_STREAM sockaddr_in AF_INET SOCK_DGRAM sockaddr_in AF_INET6 SOCK_DGRAM sockaddr_in6 AF_INET6 SOCK_DGRAM sockaddr_in6 TCP IPv4 IPv6 UDP IPv4 sockets IPv6 sockets Address returned by accept or recvfrom IPv6IPv4 IPv4 mapped
  • 7. IPv6 client, IPv4 server  IPv4 server start on an IPv4 only host and create an IPv4 listening socket  IPv6 client start, call gethostbyname. IPv4 mapped IPv6 address is returned.  Using IPv4 datagram
  • 8. IPv4 datagram IPv6 datagram AF_INET SOCK_STREAM sockaddr_in AF_INET SOCK_DGRAM sockaddr_in AF_INET6 SOCK_DGRAM sockaddr_in6 AF_INET6 SOCK_DGRAM sockaddr_in6 TCP IPv4 IPv6 UDP IPv4 sockets IPv6 sockets Address for connect or sendto IPv6IPv4 IPv4 mappedIPv6
  • 9. IPv6 Address Testing Macros  There are small class of IPv6 application that must know whether they are talking to an IPv4 peer.  These application need to know if the peer’s address is an IPv4-mapped IPv6 address.  Twelve macro defined(참조 page 267)
  • 10. IPV6_ADDRFORM Socket Option  Can change a socket from one type to another, following restriction.  An IPv4 socket can always be changed to an IPv6. Any IPv4 address already associated with the socket are converted to IPv4- mapped IPv6 address.  An IPv6 socket can changed to an IPv4 socket only if any address already associated with the socket are IPv4- mapped IPv6 address.
  • 11. Int af; socklen_t clilen; struct sockaddr_int6 cli; /* IPv6 struct */ struct hostent *ptr; af = AF_INT6; Setsockopt(STDIN_FILENO, IPPROTO_IPV6, IPV6_ADDRFORM, &af, sizeof(af)); clilen = sizeof(cli); Getpeername(0, &cli, &clilen); ptr = gethostbyaddr(&cli.sin6_addr, 16, AF_INET); Converting an IPv4 to IPv6
  • 12.  setsockopt => change the Address format of socket from IPv4 to IPv6.  Return value is AF_INET or AF_INET6  getpeername =>return an IPv4-mapped IPv6 address
  • 13. Source Code Portability  #ifdefs => hard to maintain, littered …  use getaddrinfo and getnameinfo

×