Logo 
Search:

Networking Articles

Submit Article
Home » Articles » Networking » TCP/IPRSS Feeds

TCP/IP program to build the Finite State Machine data structures

Posted By: Milind Mishra     Category: Networking     Views: 2851

TCP/IP program to build the Finite State Machine data structures

Code for TCP/IP program to build the Finite State Machine data structures in Networking

#include <sys/types.h>
#include <stdio.h>
#include "tnfsm.h"externstruct fsm_trans    ttstab[], sostab[], substab[];
extern u_char        ttfsm[][NCHRS], sofsm[][NCHRS], subfsm[][NCHRS];
externint        ttstate, sostate, substate;

int fsminit(u_char fsm[][NCHRS], struct fsm_trans ttab[], int nstates);

int
fsmbuild()
{
    fsminit(ttfsm, ttstab, NTSTATES);
    ttstate = TSDATA;

    fsminit(sofsm, sostab, NKSTATES);
    sostate = KSREMOTE;

    fsminit(subfsm, substab, NSSTATES);
    substate = SS_START;
}
  
Share: 



Milind Mishra
Milind Mishra author of TCP/IP program to build the Finite State Machine data structures is from India.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!