Abstract Syntax Notation Computer Networks courses Villanova University.

Slides:



Advertisements
Similar presentations
Programming Paradigms and languages
Advertisements

1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 2: Data types and addressing modes dr.ir. A.C. Verschueren.
Elementary Data Types Prof. Alamdeep Singh. Scalar Data Types Scalar data types represent a single object, i.e. only one value can be derived. In general,
TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
Time Michelle Houck April 28, 2008, 4:15pm EST. What is time? Standard by which we measure Standard by which we measure One of the fundamental units of.
8 November Forms and JavaScript. Types of Inputs Radio Buttons (select one of a list) Checkbox (select as many as wanted) Text inputs (user types text)
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Introduction.
Elementary Data Types Scalar Data Types Numerical Data Types Other
The Fundamentals of C++ Basic programming elements and concepts JPC and JWD © 2002 McGraw-Hill, Inc.
JavaScript, Third Edition
Jump to first page PKI2001 (TIFR, Mumbai) ASN.1 Abstract Syntax Notation One ASN.1 is a standard way to describe a message(a unit application data) that.
Chapter 1 Program Design
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
Structured Data Types. Date Types We have seen various data types –Integer, Real, Character, Logical All these types define data values of different kinds.
RRB PAGES Local Time and Time Zones. Solar Noon and Time Zones Solar Noon: when the sun is at the highest point in the sky. This may not be the.
Social Studies 9 Chapter 2 Time Zones.  A time zone is a region of the Earth that has adopted the same standard time, usually referred to as the local.
CSC 8310 Programming Languages Meeting 2 September 2/3, 2014.
These materials are prepared only for the students enrolled in the course Distributed Software Development (DSD) at the Department of Computer.
Fundamentals of Python: From First Programs Through Data Structures
SNMP: Simple Network Management Protocol
Lecture for Week Spring.  Numbers can be represented in many ways. We are familiar with the decimal system since it is most widely used in everyday.
Fundamentals of Python: First Programs
Abstract Syntax Notation One ASN.1
ASN.1 CNS 4650 Fall 2004 Rev. 2.
Presentation Services  need for a presentation services  ASN.1  declaring data type  encoding data types  implementation issues  reading: text, section.
Using Your Sky Software Found at the Sky Maps link at the PHY250 website Some useful information Dayton, OH is at about 40 o North Latitude and 84 o West.
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 CST 221 OBJECT ORIENTED PROGRAMMING(OOP) ( 2 CREDITS.
Processing of structured documents Spring 2002, Part 2 Helena Ahonen-Myka.
Abstract Syntax Notation ASN.1 Week-5 Ref: “SNMP…” by Stallings (Appendix B)
1 Relational Expressions Relational expressions: –Expressions that compare operands –Sometimes called conditions –Evaluated to yield a result –Typically.
Lec 6 Data types. Variable: Its data object that is defined and named by the programmer explicitly in a program. Data Types: It’s a class of Dos together.
An Introduction to Abstract Syntax Notation 1 (ASN.1)
Data TypestMyn1 Data Types The type of a variable is not set by the programmer; rather, it is decided at runtime by PHP depending on the context in which.
CONTENTS Processing structures and commands Control structures – Sequence Sequence – Selection Selection – Iteration Iteration Naming conventions – File.
Tutorial 13 Validating Documents with Schemas
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
CONSTANTS Constants are also known as literals in C. Constants are quantities whose values do not change during program execution. There are two types.
Copyright Curt Hill Variables What are they? Why do we need them?
Introducing C++ Programming Lecture 3 Dr. Hebbat Allah A. Elwishy Computer & IS Assistant Professor
1 COMS 261 Computer Science I Title: C++ Fundamentals Date: September 9, 2005 Lecture Number: 6.
Objects – State u There are only two things we can do to an object u Inspect it’s state u Alter it’s state u This is a profound statement! u If you think.
CS1Q Computer Systems Lecture 2 Simon Gay. Lecture 2CS1Q Computer Systems - Simon Gay2 Binary Numbers We’ll look at some details of the representation.
Ajmer Singh PGT(IP) Programming Fundamentals. Ajmer Singh PGT(IP) Java Character Set Character set is a set of valid characters that a language can recognize.
CSI 3125, Preliminaries, page 1 Data Type, Variables.
Restrictions Objectives of the Lecture : To consider the algebraic Restrict operator; To consider the Restrict operator and its comparators in SQL.
Application support functions Chapter Introduction ASN.1 Security Data encryption Nonrepudiation Authentication Public key certification authorities.
Types Chapter 2. C++ An Introduction to Computing, 3rd ed. 2 Objectives Observe types provided by C++ Literals of these types Explain syntax rules for.
© 2006 Pearson Addison-Wesley. All rights reserved 1-1 Chapter 1 Review of Java Fundamentals.
Basic Data Types อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา Chapter 4.
BER ENCODING Basic Encoding Rules. Basic Encoding Rules What is it?  BER is the original rules laid out by the ASN.1 standard for encoding information.
Scalar and composite data Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
CSE 110: Programming Language I Matin Saad Abdullah UB 1222.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
Chapter 27 Network Management Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9/21/2016 Presentation layer Abstract Syntax Notation #1 Basic Encoding Rules.
Jaringan Telekomunikasi, Sukiswo ST, MT Sukiswo
Presentation Services
The ITU-T X.500 series and X.509 in a changing world
ASN.1: Introduction Zdeněk Říha.
Network Management Information model
Variables and Primative Types
Dept. of Computer Science and Engineering
ASN.1 소개 건아정보기술 SW개발팀 김강민 주임연구원.
Introduction to Abstract Data Types
Chapter 1: Computer Systems
Lecture 4: Lexical Analysis & Chomsky Hierarchy
The Fundamentals of C++
Presentation transcript:

Abstract Syntax Notation Computer Networks courses Villanova University

Platform and language independence 4 The purpose of ASN.1 is to allow specification of an information exchange between cooperating parts of a distributed application, independent of the platform and language used for implementation

ASN.1 Shared Representation Application Source Code Java Application Source Code C Abstract Specification ASN.1 Compiler Application Process in System A Application Process in System B Compatible information flow Site ASite B

Abstract Syntax 4 Represent the data types and structures 4 Separate definition of the transfer syntax allows interaction

Modules and Assignments 4 Module is the fundamental unit –name a collection of type definitions and/or value definitions (assignments)

Example module (A type definition) InventoryList { } DEFINITIONS ::= BEGIN { ItemId ::= SEQUENCE { partnumberIA5String, quantityINTEGER, wholesalepriceREAL, salepriceREAL } StoreLocation ::= ENUMERATED { Baltimore (0), Philadelphia (1), Washington (2), } } END The words Baltimore, Philadelphia, and Washington are used to represent the values 0, 1, 2 for this type.

Type Assignment 4 Type reference (name of the type) 4 ::= 4 type 4 comments begin with -- and end with EOL or --

Value Assignment 4 Value reference (name of the value) 4 ::= 4 valid value notation 4 value reference must begin with lower case letter

Simple types 4 BOOLEAN (true or false) 4 INTEGER (any positive or negative whole number or zero) 4 REAL (mantissa, base, exponent) 4 BIT STRING (ordered string of bits) 4 OCTET STRING (ordered string of octets) 4 NULL (null is the only allowed value) 4 OBJECT IDENTIFIER (identifies a place in a tree) 4 ENUMERATED (a list of names of values) 4 CHARACTER STRING (several are defined)

Structured Types 4 SEQUENCE/SEQUENCE OF –An ordered collection; “of” indicates all entries are the same type 4 SET/SET OF –an unordered collection; “of” indicates entries are the same type 4 CHOICE –collection of types from which one is chosen 4 SELECTION –references a CHOICE type

Tagging 4 When one of several types might be transmitted at a particular time, tagging allows the receiving system to decode correctly 4 UNIVERSAL (predefined and standard Example Integer is universal tag 1, etc.) 4 APPLICATION (defined within an application) 4 PRIVATE (defined within an organization) 4 CONTEXT-SPECIFIC (locally defined)

Basic Encoding Rules 4 ASN.1 definitions made concrete by specific rules for encoding. 4 Basic structure: Tag, Length, Value 4 Tag: Class, simple or constructed, code –Integer: –Class universal = 00, simple type = 0, code for integer tag = 1 –Integer value 27, shown in hexadecimal: 01011B 4 Nesting works to encode complex types tag length

Time 4 GeneralizedTime –Local: YYYYMMDDHHMMSS.fff –Universal:YYYYMMDDHHMMSS.fffZ –Difference: YYYYMMDDHHMMSS.fff+-HHMM –(fractions of seconds are optional) Time shift from UTCTime 4 UTCTime –same formats as above –no fff; seconds optional 4 So what time is it? Express the current time in the Generalized Time format

Coordinated Universal Time (UTC) Based on the second (SI). For most practical purposes UTC is equivalent to mean solar time at the prime meridian (0° longitude), formerly expressed in GMT. The second was formerly defined in terms of astronomical phenomena. The change to atomic resonance phenomena ("atomic time") to define the second more precisely.led to need for occasional adjustments in the "atomic" time scale to coordinate it with the workaday mean solar time scale, UT-1. Rotational irregularities usually result in a net decrease in the Earth's average rotational velocity, and ensuing lags of UT-1 with respect to UTC. Adjustments to the atomic, i.e., UTC, time scale consist of an occasional addition or deletion of one full second, which is called a leap second. Twice yearly, during the last minute of June 30 and December 31, Universal Time, adjustments may be made to ensure that the accumulated difference between UTC and UT-1 will not exceed 0.9 s before the next scheduled adjustment. The last minute of the UTC time scale, on the day when an adjustment is made, will have 59 or 61 seconds. Synonyms World Time, Z Time, Zulu Time. Source: January 2001

Use of time standards UTC - Coordinated Universal Time Weather observations and forecasts are usually reported in UTC, which used to be known as Greenwich Mean Time (GMT), i.e. the local time at the Greenwich meridian (zero degrees longitude). This allows weather observations the world over to have the same time stamp. Since UTC is ahead of local time in the United States, sometimes weather data will have tomorrow's date, but it still represents today's data (we are not THAT good at forecasting the weather). UTC is 8 hours ahead of Pacific Standard Time (e.g UTC is 4 p.m. PST the previous day, 1200 UTC is 4 a.m. PST the same day), 7 hours ahead of Pacific Daylight Time (e.g UTC is 5 p.m. PDT the previous day, 1200 UTC is 5 a.m. PDT the same day). P.S. it is UTC instead of CUT to make the abbreviation language independent. Source: January 2001 What time is it here, as an offset from UTC?

If you really want to know what time it is 4 Check this site:

SubtreeSpecification ::= SEQUENCE { base [0] LocalName DEFAULT { }, COMPONENTS OF ChopSpecification, specificationFilter [4] Refinement OPTIONAL } -- empty set specifies whole administrative area LocalName ::= RDNSequence ChopSpecification ::= SEQUENCE { specificExclusions [1] SET OF CHOICE { chopBefore [0] LocalName, chopAfter [1] LocalName } OPTIONAL, minimum [2] BaseDistance DEFAULT 0, maximum [3] BaseDistance OPTIONAL } BaseDistance ::= INTEGER (0.. MAX) Refinement ::= CHOICE { item [0] OBJECT-CLASS.&id, and [1] SET OF Refinement, or [2] SET OF Refinement, not [3] Refinement } Source ( January 2001): ftp://ftp.bull.com/pub/OSIdirectory/2ndEditionSpecifications/ASN.1modules/compilableASN.1 Part of an example specification in ASN.1

Current uses of ASN.1 4 Every call placed on a cellular telephone in North America, Europe, and Japan results in TCAP protocol messages. These messages, described using ASN.1 and encoded using one its predefined encoding rules (e.g., The Basic Encoding Rules (BER) 4 Also, routing of 800- number calls, reverse charging, other special phone services all are defined using ASN.1 messages See for further information

Java classes for ASN.1 Class iaik.asn1.ASN java.lang.Object | +----iaik.asn1.ASN public class ASN extends java.lang.Object implements java.lang.Cloneable The ASN class represents the ASN.1 types. These types are represented at the Java level with ASN.XXX literals. This class also acts as an factory for creating ASN.1 OBJECT subclasses for various kinds of Java objects. Each new created ASN.1 type has to be registered in the factory by specifying the class that implements the particular ASN.1 type. Source: (January 2001)

Exercises 4 Chapter 3 of Cassel/Austing Computer Networks –page , # 10, 11