1 / 25

Abstract Syntax Notation ASN.1 Week-5

Abstract Syntax Notation ASN.1 Week-5. Ref: “SNMP…” by Stallings (Appendix B). ABSTRACT SYNTAX NOTATION ASN.1. Formal Language developed by ITU-T and ISO for defining abstract syntax of application data. Abstract Syntax.

sugar
Télécharger la présentation

Abstract Syntax Notation ASN.1 Week-5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Abstract Syntax NotationASN.1Week-5 Ref: “SNMP…” by Stallings (Appendix B)

  2. ABSTRACT SYNTAX NOTATIONASN.1 • Formal Language developed by ITU-T and ISO for defining abstract syntax of application data

  3. Abstract Syntax • Describes the generic structure of data independent of any encoding technique used to represent the data. • The syntax allows data types to be defined and values of those types to be specified

  4. Data Type • A named set of values. • A type may be simple, which is defined by specifying the set of values, or structured, which is defined in terms of other types.

  5. Some Terms and Definitions… Encoding • The complete sequence of octets used to represent a data value. Encoding Rules • Rules for encoding the data corresponding to the specific transfer syntax

  6. Transfer Syntax • The way in which data are actually represented in terms of bit patterns while in transit between applications.

  7. Why use ASN.1 ? • Application data is supported by representing information in an abstract form independent from any specific representation • Many similarities to the data-definition type languages eg Pascal and to grammars used to define them eg BNF.

  8. Abstract syntax is used for the exchange of information between application components in different systems. • Information within a system must be mapped from abstracted form into some form for local storage and presentation to the user/application.

  9. Deals with the two problems that relate to data representation in heterogeneous, networked environments: • Common representation for the exchange of data between differing systems • Internal to a system, an application uses its own representation of data. This scheme deals with differences between local application entities.

  10. Transfer syntax must support Abstract syntax • Transfer syntax may have characteristics that are not related to the abstract syntax - eg, compression, encryption. Choice of transfer syntax used depends upon cost and security considerations.

  11. ASN.1 Concepts • Module – a basic building block • Define data structures, the name of the module can be used to reference the structure.

  12. ASN.1 Lexical Conventions • Layout is not significant (multiple spaces and blank lines can be ignored) • Comments delimited by - - at beginning and the end of the comment or ended by the end of the line • Identifiers (names), type references (type names), and module names can be constructed from letters, digits and hyphens

  13. ASN.1 Lexical Conventions • An identifier begins with a lower case letter • A type reference or module name begins with a uppercase letter • A built-in type (commonly used type) consists of all capital letters

  14. Basic form of Module <modulereference> DEFINITIONS::= BEGIN EXPORTS IMPORTS AssignmentList END

  15. <modulereference> is the module name • EXPORTS construct indicates which definitions in this module may be imported by other modules • IMPORTS construct indicates which type and value definitions from other modules are to be imported into the module

  16. The assignment list consists of type assignments, value assignments, and macro definitions • Type and value assignments have the form:<name> ::= <description> eg of a type definition SerialNumber ::= INTEGER

  17. Abstract Data Types Four categories of types • Simple • Structured (has components) • Tagged • Other

  18. Abstract Data Types Four classes of tags • UNIVERSAL: general, application independent • APPLICATION: relevant to particular application • Context-specific: limited to a specific context • Private: defined by users, non-standard

  19. Abstract Data Types Simple types • Defined by specifying the set of its values (may be in binary or Hexadecimal, or some other form) eg BOOLEAN, INTEGER, BIT STRING, REAL

  20. Abstract Data Types Structured types • Consist of components. There are four structured types: • SEQUENCE )ordered list of values • SEQUENCE OF ) • SET )unordered list of values • SET OF )

  21. Abstract Data Types Tagged types • Used to assign new type names Eg Employee_name Customer_name which are the same type

  22. Abstract Data Types Other types • CHOICE and ANY are data types without tags. • The type is assigned at execution.

  23. Macro Definitions • ASN.1 Permits the definition of macros to extend the syntax to define new types and their values.

  24. Macro Definitions • A macro definition has the following form: <macroname> MACRO ::= BEGIN TYPE NOTATION ::= <new-type-syntax> VALUE NOTATION ::= <new-value-syntax> <supporting productions> END • <macroname> is written in upper case

  25. Basic Encoding Rules • ASN.1 types are encoded as a string of octets according to ITU-T X.209 and ISO 8825 Encoding in the form of type; length; value

More Related