Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vsnet_socketflags.cpp File Reference
#include <config.h>
#include "vsnet_headers.h"
#include <sys/ioctl.h>
#include "vsnet_socketflags.h"

Go to the source code of this file.

Functions

ostream & operator<< (ostream &ostr, PCKTFLAGS f)
 

Function Documentation

ostream& operator<< ( ostream &  ostr,
PCKTFLAGS  f 
)

Definition at line 17 of file vsnet_socketflags.cpp.

References ACKED, COMPRESSED, HIPRI, LOPRI, RESENT, SENDANDFORGET, SENDRELIABLE, and SENT.

18 {
19  int flags = f;
20  if (flags == 0) ostr<<"NONE";
21  return ostr;
22  if (flags&SENDANDFORGET) ostr<<"SENDANDFORGET ";
23  if (flags&SENT) ostr<<"SENT ";
24  if (flags&RESENT) ostr<<"RESENT ";
25  if (flags&ACKED) ostr<<"ACKED ";
26  if (flags&SENDRELIABLE) ostr<<"SENDRELIABLE ";
27  if (flags&LOPRI) ostr<<"LOPRI ";
28  if (flags&HIPRI) ostr<<"HIPRI ";
29  if (flags&COMPRESSED) ostr<<"COMPRESSED ";
30  flags &= ~0x101f;
31  if (flags != 0) ostr<<hex<<flags;
32  return ostr;
33 }