OpenSS7
SS7 for the
Common Man

© Copyright 1997-2004,OpenSS7 Corporation, All Rights Reserved.
Last modified:

Home Overview Status News Documentation Resources About
   
 Overview
 Status
 News
 Documentation
 Resources
 About

   
Home Index Prev Next More Download Info FAQ Mail   Home -> Resources -> Browse Source -> strss7/lib/libxnet/t_putmsg.c


File /code/strss7/lib/libxnet/t_putmsg.c



#ident "@(#) $RCSfile: t_putmsg.c,v $ $Name:  $($Revision: 0.8.2.2 $) $Date: 2003/05/27 11:21:51 $"

static char const ident[] = "$RCSfile: t_putmsg.c,v $ $Name:  $($Revision: 0.8.2.2 $) $Date: 2003/05/27 11:21:51 $";

#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <sys/stropts.h>
#include <sys/xti.h>
#include <sys/tpi.h>
#include <timod.h>
#include "xti.h"

/*
 *  T_PUTMSG - a version of putmsg with XTI errors
 */
int t_putmsg(int fd, struct strbuf *ctrl, struct strbuf *data, int flags)
{
	if (putmsg(fd, ctrl, data, flags) == 0)
		return (0);
	switch (errno) {
	case EAGAIN:
		goto tflow;
	case EBADF:
	case EIO:
	case EISDIR:
	case ENODEV:
	case ENOSTR:
	case ENXIO:
		goto tbadf;
	case EFAULT:
	case EINVAL:
	case ERANGE:
		/* bug probably in xti */
		goto tproto;
	case EINTR:
	case ENOSR:
		break;
	}
	goto tsyserr;
      tflow:
	t_errno = TFLOW;
	goto error;
      tbadf:
	t_errno = TBADF;
	goto error;
      tproto:
	t_errno = TPROTO;
	goto error;
      tsyserr:
	t_errno = TSYSERR;
	goto error;
      error:
	return (-1);
}



Home Index Prev Next More Download Info FAQ Mail   Home -> Resources -> Browse Source -> strss7/lib/libxnet/t_putmsg.c

OpenSS7
SS7 for the
Common Man
Home Overview Status News Documentation Resources About

© Copyright 1997-2004,OpenSS7 Corporation, All Rights Reserved.
Last modified: