Logo 
Search:

Networking Articles

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

TCP/IP program of output processing for (local) network virtual printer

Posted By: Milind Mishra     Category: Networking     Views: 3097

TCP/IP program of output processing for (local) network virtual printer.

Code for TCP/IP program of output processing for (local) network virtual printer in Networking

#include <sys/types.h>
#include <stdio.h>
#include "tnfsm.h"externstruct fsm_trans    ttstab[];
extern u_char        ttfsm[][NCHRS];
externint        ttstate;

/*------------------------------------------------------------------------ * ttwrite - do output processing for (local) network virtual printer *------------------------------------------------------------------------ */int
ttwrite(FILE *sfp, FILE *tfp, u_char *buf, int cc)
{
    struct fsm_trans    *pt;
    int            i, ti;

    for (i=0; i<cc; ++i) {
        int    c = buf[i];

        ti = ttfsm[ttstate][c];
        pt = &ttstab[ti];

        (pt->ft_action)(sfp, tfp, c);
        ttstate = pt->ft_next;
    }
}
  
Share: 



Milind Mishra
Milind Mishra author of TCP/IP program of output processing for (local) network virtual printer 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!