Go to the documentation of this file.
   36         memcpy(&ios, &tmh.
ios, 
sizeof(ios));
 
   50     memset(&name, 0, 
sizeof(name));
 
   51     memset(&ios, 0, 
sizeof(ios));
 
   63         Must(!msg_namelen && !msg_name);
 
   67         Must(msg_iovlen == 1);
 
   69         ios[0].iov_base = &data;
 
   70         Must(ios[0].iov_len == 
sizeof(data));
 
   72         Must(!msg_iovlen && !msg_iov);
 
   76         Must(msg_controllen > 0);
 
   79         Must(!msg_controllen && !msg_control);
 
   96     Must(rawType() == destType);
 
  103         Must(data.type_ == aType);
 
  127     const int length = getInt();
 
  135     Must(length <= maxSize);
 
  138     getRaw(&buf, length);
 
  154     getRaw(rawBuf, rawSize);
 
  161     putRaw(rawBuf, rawSize);
 
  169         Must(rawSize <= data.size - offset);
 
  170         memcpy(rawBuf, data.raw + offset, rawSize);
 
  180         Must(rawSize <= 
sizeof(data.raw) - data.size);
 
  181         memcpy(data.raw + data.size, rawBuf, rawSize);
 
  182         data.size += rawSize;
 
  202     const int fdCount = 1;
 
  210     memcpy(fdStore, &fd, fdCount * 
sizeof(
int));
 
  219     Must(msg_control && msg_controllen);
 
  226     const int fdCount = 1;
 
  227     const int *fdStore = 
reinterpret_cast<const int*
>(
SQUID_CMSG_DATA(cmsg));
 
  229     memcpy(&fd, fdStore, fdCount * 
sizeof(
int));
 
  248     Must(!msg_iovlen && !msg_iov);
 
  251     ios[0].iov_base = &data;
 
  252     ios[0].iov_len = 
sizeof(data);
 
  260     Must(!msg_name && !msg_namelen);
 
  262     msg_namelen = 
sizeof(name); 
 
  268     Must(!msg_control && !msg_controllen);
 
  270     msg_controllen = 
sizeof(ctrl);
 
  
unsigned int offset
data offset for the next get/put*() to start with
const char * rawBuf() const
void setType(int aType)
sets message type; use MessageType enum
void putFixed(const void *raw, size_t size)
always store size bytes
void checkType(int aType) const
struct Ipc::TypedMsgHdr::DataBuffer data
same as .msg_iov[0].iov_base
bool hasFd() const
whether the message has a descriptor stored
void prepForReading()
reset and provide all buffers
void putInt(int n)
store an integer
int getInt() const
load an integer
int getFd() const
returns stored descriptor
struct sockaddr_un name
same as .msg_name
struct iovec ios[1]
same as .msg_iov[]
void getString(String &s) const
load variable-length string
void getRaw(void *raw, size_t size) const
low-level loading of exactly size bytes of raw data
#define CMSG_FIRSTHDR(mhdr)
void assign(const char *str, int len)
struct msghdr with a known type, fixed-size I/O and control buffers
void putFd(int aFd)
stores descriptor
void allocData()
initialize io vector with one io record
void address(const struct sockaddr_un &addr)
sets [dest.] address
#define SQUID_CMSG_DATA(cmsg)
void putString(const String &s)
store variable-length string
void getFixed(void *raw, size_t size) const
always load size bytes
TypedMsgHdr & operator=(const TypedMsgHdr &tmh)
void putRaw(const void *raw, size_t size)
low-level storage of exactly size bytes of raw data
struct Ipc::TypedMsgHdr::CtrlBuffer ctrl
same as .msg_control