Salut !
Les sources de
odhcpd fournissent peu de références. Cela me pose des difficultés sur la recherche du sens.
Je comprends les choses à moitié. Clairement, je ne suis pas au niveau. Et cela me fait perdre du temps. Je
pense que ceux qui ont codé l'implémentation de odhcpd ont une bonne compréhension des standards IPv6.
Pourriez-vous m’ôtez un doute ?
Pourquoi une adresse IPv6 est-elle attribuable à un nœud quel que soit son lien physique ? (Voir tout en bas).
Dans ma conception partielle, on définit un plan d'adressage hiérarchique. En théorie, n'importe quel nœud
situé sur un réseau peut communiquer avec un nœud lambda situé sur un autre réseau, par IP.
Je ne comprend quasiment rien à la fonction
assign_pd(). Les champs de la structure
dhcp_assignmentne sont pas toujours très évident (idem pour
struct interface). Ce n'est pas une demande : parcourir tout
le code (e.g. bibliothèque...), je ne demande pas de chercher à le lire afin de le comprendre pleinement.
Je fais peut-être fausse route avec plusieurs points de blocage (e.g. avec
addr6_len tel qu'employé
ici).
>>>
IPv6 Subnet Model: The Relationship between Links and Subnet Prefixes IPv4 implementations typically associate a netmask with an address
when an IPv4 address is assigned to an interface. That netmask
together with the IPv4 address designates an on-link prefix. Nodes
consider addresses covered by an on-link prefix to be directly
attached to the same link as the sending node, i.e., they send
traffic for such addresses directly rather than to a router. See
Section 3.3.1 of [RFC1122]. Prior to the development of subnetting
[RFC0950] and Classless Inter-Domain Routing (CIDR) [RFC4632], an
address's netmask could be derived directly from the address simply
by determining whether it was a Class A, B, or C address. Today,
assigning an address to an interface also requires specifying a
netmask to use. In the absence of specifying a specific netmask when
assigning an address, some implementations would fall back to
deriving the netmask from the class of the address.
The behavior of IPv6 as specified in Neighbor Discovery (ND)
[RFC4861] is quite different. The on-link determination is separate
from the address assignment. A host can have IPv6 addresses without
Singh, et al. Standards Track [Page 2]
RFC 5942 IPv6 Subnet Model July 2010
any related on-link prefixes or can have on-link prefixes that are
not related to any IPv6 addresses that are assigned to the host. Any
assigned address on an interface should initially be considered as
having no internal structure as shown in [RFC4291].