Logo 
Search:

Networking Articles

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

TCP/IP program of session scripting

Posted By: Milind Mishra     Category: Networking     Views: 1403

TCP/IP program of session scripting.

Code for TCP/IP program of session scripting in Networking

#include <termios.h>
#include <string.h>
#include <stdio.h>
#include "local.h"#define    SFBUFSZ        2048    /* script filename buffer size    */struct termios    tntty;
FILE        *scrfp;
char        scrname[SFBUFSZ];
int        scrindex;

/*ARGSUSED*/int
scrgetc(FILE *sfp, FILE *tfp, int c)
{
    scrname[scrindex++] = c;
    if (scrindex >= SFBUFSZ) {    /* too far */
        fprintf(tfp, "\nname too long\n");
        if (tcsetattr(0, TCSADRAIN, &oldtty) < 0)
            errexit("tcsetattr: %s\n", strerror(errno));
        return -1;
    }
    return 0;
}
  
Share: 


Didn't find what you were looking for? Find more on TCP/IP program of session scripting Or get search suggestion and latest updates.

Milind Mishra
Milind Mishra author of TCP/IP program of session scripting 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!