Image result for Networking Protocol logo

Networking


Usually networking protocol are developed on layering. Each layering is responsible for different activities performed during communication in a communication systems that is for performing any task in networking there is  set of rules which is strictly followed by networking system.

TCP/IP  

TCP/IP is the combination different set of instructions and rules and various layers. It allows protocol suite for all kind of computers and for all kind of operating systems .  Basely it consists of  four layer system and is below.

   1. Application layer system.
          For example -
    Image result for Layering ,Networking Protocol,TCP/IP
  • Telnet 
  • FTP
  • Email 
   2. Transport layer system.
         For example -
  • TCP
  • UDP
   3. Network layer system. 
         For example -
  •  IP
  • ICMP
  • IGMP
   4. Link layer system.
          For example -
  • Device drivers.
  • Interface card. 
 

Application layer 

This layering responsible to handles the detail of particular application.
There are many TCP/IP applications which are handled by application layer system.  
  •  Telnet for remote login
  •  FTP, the File Transfer Protocol
  •  SMTP, the Simple Mail Transfer protocol, for electronic mail
  •  SNMP, the Simple Network Management Protocol,

 Transport layer

This layer is responsible for to handles the flow of data in between two 
hosts. In the TCP/IP protocol suite there are two vastly different transport protocols: 
1.  TCP (Transmission Control Protocol) provides a reliable flow of data between two hosts.
2. UDP (User Datagram Protocol) sends packets of data called datagrams from one host to another host.  

 Network layer

This layer of TCP/Ip handles the moment of packet around a network by routing  of packets  through -  IP (Internet Protocol), ICMP (Internet Control Message Protocol), and IGMP (Internet Group Management Protocol). 

 Link layer  

This layer is responsible for data linking that is why this layer is also known as Data-link layer. Normally it handles the operating system and the corresponding network interface card in the computer.


We would like to have an interactive session .comment your questions below 

Be Updated ! Be safe !

Cheers !!






Polish notation

  The grate polish mathematician came up with a new technique for representation  and calculation of arithmetic expression where operator will be before or after the operand called polish notation.

Normal expression    A+B
Prefix                       +AB
Postfix                       AB+
Infix                          A+N     

Example questions -- 

convert the following expression to prefix & postfix
{[(A+B)/C] *(D-E)}

 

Image result for prefix, postfix and infix Prefix

We have to solve above expression according to the  priory of operators
First we solve the brackets

={[(+AB)/C]*(-DE)}

={[/+ABC]*(-DE)}

={*/+ABC-DE}

Prefix expression is   */+ABC-DE

 Postfix 

Image result for prefix, postfix and infix

={[(AB+)/C]*(DE-)}

={[AB+C/]*(DE-)}

={AB+CD/DE-*}

=AB+CD/DE-*

postfix  expression is  AB+CD/DE-*

Algorithms  for converting infix to postfix using stack 

  1.  Add a unique symbol # into stack and add it in the end of array infix. 
     A*(B+C^D)-E^F  #
  2.  Scan the symbol of array infix one by one from left to right.
  3. Symbol is left parenthesis '(' then add it to the array.   
  4. Symbol is operand then add it to array postfix.
  5. Symbol is operator then pop the operator which have same priority or higher priority then operator which occurred .
  6. Add the pop operator to array.
  7. Add the scaned symbole into stack.
  8. Symbol is right parenthesis ')' then pop all the operator from the stack. 
  9. Symbol is # then pop all the symbol from stack & add them to array except #.
  10. You ave done it . 

For example . 

 Image result for Polish notation

Infix expression is    A*(B+C^D)-E^F 

 A*(B+C^D)-E^F  #

Symbole Stack Postfix expression
A

A
* * A
( *( A
B *(+ AB
+ *(+ AB
C *(+ ABC
^ *(+^ ABC
D *(+^ ABCD
) * ABCD^+
- - ABCD^+*
E - ABCD^+*E
^ -^ ABCD^+*E
F -^ ABCD^+*EF
* -* ABCD^+*EF^
( -*( ABCD^+*EF^
G -*( ABCD^+*EF^G
/ -*(/ ABCD^+*EF^G
H -*(/ ABCD^+*EF^GH
) -* ABCD^+*EF^GH/
#

ABCD^+*EF^GH/*-

 

We would like an interactive session. Comment your question below.

Be Updated Be safe !

Cheers !!



c

 

  Introduction to Data structure  

Data structure is a way to organized data in some way so that we can perform operations on the data in effective way.
Some examples are listed below.
    Image result for Data Structure  , C Programing
  • Link List.
  • Stack.
  • Queue.
  • Tree.
  • Graph.
  • Hash Table.
We select data structure according to need that is-
1) Size of data.
2) Amount of data.

 

For Implementing Data structure We need to understand Dynamic Memory Allocation 

 

 

Pointers - A pointer is  variable which contain the  memory address of another variable. 

 Declaration Of Pointer variable -

int a;  // Normal variable Declaration
int *a; // Pointer Variable Declaration

Operators Of Pointer -

  •  &  - Address Operator 
  •  *    - Value at the address operator 

Example of Pointer -

 #include<stdio.h> // Header files
Void main()
{
int a=5;
int  *p ;
p = &a ;
printf("\n %d",a);         // 5
printf("\n %d",p);         // address 25001
printf("\n %u",&a);      //25001
printf("\n %u",&a);      // 25002
printf("\n %d",*p);       // 5
printf("\n %d",*(&a));  // 5
return 0;
}

Dynamic Memory Allocation

Image result for Data Structure  , Dynamic Memory Allocation  , C Programing
The process allocating at the time of execution is called dynamic memory allocation. The allocation and releasing  of the memory space can be done with the use of some built in functions. 
  • sizeof() 
  • malloc()
  • calloc()
  • free()

sizeoff() 

 The size of operation is use to find the  size  of argument in terms of byte . the argument can be  variable or any data type.
Example.
int a[10] ;
sizeof(a);      // 20
sizeof(float); // 4 

malloc() 

This function is use to allocate the memory space.
Syntax - ptr =(data type *) malloc( specific size) ;
Example.
ptr =(int*) malloc(10) ;

Calloc()

This function is used to allocate the multiple blocks of memory.
syntax - ptr = (int*) calloc( number of block , size of block ) ;
Example.
ptr =(int*) calloc ( 5 , 2) ; // this allocate 5 blocks , each of 2 bytes 

free()

This function is use to release the memory spaces.
Syntax - free(ptr);
Example.
free(ptr) ; // memory set to free 

we would like to have an interactive session. comment your questions below.

Be updated Be safe !

Cheers !!



Image result for Convert RPM  To DEB Package



DEB or Debian Package is an installation package which is compatible to Ubuntu and Ubuntu Based Operating Systems while
RPM or Red-hat Package Manager is an installation package which is compatible to RedHat Based Operating Systems.

And sometimes just sometimes we get stuck with the other kind of file in the the other kind of system, but not to worry mostly you can just convert the file to the other format by following these simple steps.


For converting RPM To DEB you have to follow these steps


  1. First we need a software package which is available on Ubuntu Based Systems. Run below command to install alien and other essentials.
    sudo apt-get install alien dpkg-dev debhelper build-essential
  2. Now we convert the file run:
    sudo alien path/filename.rpm
  3. Now we can install the deb file just run:
    sudo dpkg -i path/filename.deb

For converting DEB To RPM you have to follow these steps

  1. Firt we need a software package which is available on Red-hat Based Systems. Run below command to install alien and other essentials.
    yum -y install alien
  2. Now we convert the file run:
    sudo alien -r path/filename.deb
  3. Now we can install the deb file just run:
    sudo rpm -Uvh path/filename.rpm



Well everything is just really about compatibility, if all the dependencies are satisfied then you are good to go.


we would like to have an interactive session . comment your questions below

Be Updated Be Safe  !

Cheers !!


Welcome to My Blog

Popular Post

- Copyright © Technopits -Powered by Blogger