Add support of passing SCM_BINTIME ancillary data object for PF_LOCAL
sockets. PR: kern/175883 Submitted by: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> Discussed with: glebius, phk MFC after: 2 weeks
This commit is contained in:
parent
f108ef834e
commit
ab15d8039e
@ -1798,6 +1798,7 @@ unp_internalize(struct mbuf **controlp, struct thread *td)
|
||||
struct mbuf *control = *controlp;
|
||||
struct proc *p = td->td_proc;
|
||||
struct filedesc *fdescp = p->p_fd;
|
||||
struct bintime *bt;
|
||||
struct cmsghdr *cm = mtod(control, struct cmsghdr *);
|
||||
struct cmsgcred *cmcred;
|
||||
struct file **rp;
|
||||
@ -1906,6 +1907,18 @@ unp_internalize(struct mbuf **controlp, struct thread *td)
|
||||
microtime(tv);
|
||||
break;
|
||||
|
||||
case SCM_BINTIME:
|
||||
*controlp = sbcreatecontrol(NULL, sizeof(*bt),
|
||||
SCM_BINTIME, SOL_SOCKET);
|
||||
if (*controlp == NULL) {
|
||||
error = ENOBUFS;
|
||||
goto out;
|
||||
}
|
||||
bt = (struct bintime *)
|
||||
CMSG_DATA(mtod(*controlp, struct cmsghdr *));
|
||||
bintime(bt);
|
||||
break;
|
||||
|
||||
default:
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user