Hi,
I want to make sure I understand the effect of including a submodule in another 
submodule (of the same belongs-to parent, naturally).

RFC 6020 sec. 7.1.6 says:

"When a module includes a submodule, it incorporates the contents of
the submodule into the node hierarchy of the module.  When a
submodule includes another submodule, the target submodule's
definitions are made available to the current submodule."

>From the first sentence I understand that include in a module has the effect 
>of both the definitions (typedefs, indentities, ..., as defined in the bullets 
>in the sec. 7.1.5) and the data (containers, lists, and the rest) being part 
>of the module. This means one can refer in the module to both the definitions 
>and the data from the submodule without using any prefix or the prefix of the 
>module. From the second sentence I gather that including a submodule2 in 
>submodule1 makes only the definitions from submodule2 available in submodule1 
>and they can be referred to without any prefix or the belongs-to prefix from 
>submodule1. My understanding of the second sentence is supported by the first 
>sentence of the sec. 7.1.5:

"The "import" statement makes definitions from one module available
inside another module or submodule."

With import you make only the definitions available and the import prefix must 
be specified to use them.

My actual question then is, does the effect of include in a submodule differ 
from the effect of include in a module? Is it actually an import (but you 
cannot import a submodule) in the former, while a C-style #include in the 
latter? Thank you.

Regards,
Michal Vasko

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to