mirror of
https://github.com/opnsense/src.git
synced 2026-04-22 14:49:36 -04:00
Get rid of unused functions.
MFC after: 1 week.
This commit is contained in:
parent
815d7d92c1
commit
14cfa970bf
4 changed files with 0 additions and 127 deletions
|
|
@ -247,49 +247,6 @@ sctp_build_ctl_nchunk(struct sctp_inpcb *inp,
|
|||
}
|
||||
|
||||
|
||||
char *
|
||||
sctp_build_ctl_cchunk(struct sctp_inpcb *inp,
|
||||
int *control_len,
|
||||
struct sctp_sndrcvinfo *sinfo)
|
||||
{
|
||||
struct sctp_sndrcvinfo *outinfo;
|
||||
struct cmsghdr *cmh;
|
||||
char *buf;
|
||||
int len;
|
||||
int use_extended = 0;
|
||||
|
||||
if (sctp_is_feature_off(inp, SCTP_PCB_FLAGS_RECVDATAIOEVNT)) {
|
||||
/* user does not want the sndrcv ctl */
|
||||
return (NULL);
|
||||
}
|
||||
if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_EXT_RCVINFO)) {
|
||||
use_extended = 1;
|
||||
len = CMSG_LEN(sizeof(struct sctp_extrcvinfo));
|
||||
} else {
|
||||
len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo));
|
||||
}
|
||||
SCTP_MALLOC(buf, char *, len, SCTP_M_CMSG);
|
||||
if (buf == NULL) {
|
||||
/* No space */
|
||||
return (buf);
|
||||
}
|
||||
/* We need a CMSG header followed by the struct */
|
||||
cmh = (struct cmsghdr *)buf;
|
||||
outinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmh);
|
||||
cmh->cmsg_level = IPPROTO_SCTP;
|
||||
if (use_extended) {
|
||||
cmh->cmsg_type = SCTP_EXTRCV;
|
||||
cmh->cmsg_len = len;
|
||||
memcpy(outinfo, sinfo, len);
|
||||
} else {
|
||||
cmh->cmsg_type = SCTP_SNDRCV;
|
||||
cmh->cmsg_len = len;
|
||||
*outinfo = *sinfo;
|
||||
}
|
||||
*control_len = len;
|
||||
return (buf);
|
||||
}
|
||||
|
||||
static void
|
||||
sctp_mark_non_revokable(struct sctp_association *asoc, uint32_t tsn)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -83,11 +83,6 @@ struct mbuf *
|
|||
sctp_build_ctl_nchunk(struct sctp_inpcb *inp,
|
||||
struct sctp_sndrcvinfo *sinfo);
|
||||
|
||||
char *
|
||||
sctp_build_ctl_cchunk(struct sctp_inpcb *inp,
|
||||
int *control_len,
|
||||
struct sctp_sndrcvinfo *sinfo);
|
||||
|
||||
void sctp_set_rwnd(struct sctp_tcb *, struct sctp_association *);
|
||||
|
||||
uint32_t
|
||||
|
|
|
|||
|
|
@ -6184,71 +6184,6 @@ sctp_soreceive(struct socket *so,
|
|||
}
|
||||
|
||||
|
||||
int
|
||||
sctp_l_soreceive(struct socket *so,
|
||||
struct sockaddr **name,
|
||||
struct uio *uio,
|
||||
char **controlp,
|
||||
int *controllen,
|
||||
int *flag)
|
||||
{
|
||||
int error, fromlen;
|
||||
uint8_t sockbuf[256];
|
||||
struct sockaddr *from;
|
||||
struct sctp_extrcvinfo sinfo;
|
||||
int filling_sinfo = 1;
|
||||
struct sctp_inpcb *inp;
|
||||
|
||||
inp = (struct sctp_inpcb *)so->so_pcb;
|
||||
/* pickup the assoc we are reading from */
|
||||
if (inp == NULL) {
|
||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL);
|
||||
return (EINVAL);
|
||||
}
|
||||
if ((sctp_is_feature_off(inp,
|
||||
SCTP_PCB_FLAGS_RECVDATAIOEVNT)) ||
|
||||
(controlp == NULL)) {
|
||||
/* user does not want the sndrcv ctl */
|
||||
filling_sinfo = 0;
|
||||
}
|
||||
if (name) {
|
||||
from = (struct sockaddr *)sockbuf;
|
||||
fromlen = sizeof(sockbuf);
|
||||
from->sa_len = 0;
|
||||
} else {
|
||||
from = NULL;
|
||||
fromlen = 0;
|
||||
}
|
||||
|
||||
error = sctp_sorecvmsg(so, uio,
|
||||
(struct mbuf **)NULL,
|
||||
from, fromlen, flag,
|
||||
(struct sctp_sndrcvinfo *)&sinfo,
|
||||
filling_sinfo);
|
||||
if ((controlp) && (filling_sinfo)) {
|
||||
/*
|
||||
* copy back the sinfo in a CMSG format note that the caller
|
||||
* has reponsibility for freeing the memory.
|
||||
*/
|
||||
if (filling_sinfo)
|
||||
*controlp = sctp_build_ctl_cchunk(inp,
|
||||
controllen,
|
||||
(struct sctp_sndrcvinfo *)&sinfo);
|
||||
}
|
||||
if (name) {
|
||||
/* copy back the address info */
|
||||
if (from && from->sa_len) {
|
||||
*name = sodupsockaddr(from, M_WAIT);
|
||||
} else {
|
||||
*name = NULL;
|
||||
}
|
||||
}
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -328,20 +328,6 @@ sctp_soreceive(struct socket *so, struct sockaddr **psa,
|
|||
struct mbuf **controlp,
|
||||
int *flagsp);
|
||||
|
||||
|
||||
/* For those not passing mbufs, this does the
|
||||
* translations for you. Caller owns memory
|
||||
* of size controllen returned in controlp.
|
||||
*/
|
||||
int
|
||||
sctp_l_soreceive(struct socket *so,
|
||||
struct sockaddr **name,
|
||||
struct uio *uio,
|
||||
char **controlp,
|
||||
int *controllen,
|
||||
int *flag);
|
||||
|
||||
|
||||
void
|
||||
sctp_misc_ints(uint8_t from, uint32_t a, uint32_t b, uint32_t c, uint32_t d);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue