MCPcopy Create free account
hub / github.com/F-Stack/f-stack / in_pcb_lport

Function in_pcb_lport

freebsd/netinet/in_pcb.c:925–938  ·  view source on GitHub ↗

* Select a local port (number) to use. */

Source from the content-addressed store, hash-verified

923 * Select a local port (number) to use.
924 */
925int
926in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp, u_short *lportp,
927 struct ucred *cred, int lookupflags)
928{
929 struct sockaddr_in laddr;
930
931 if (laddrp) {
932 bzero(&laddr, sizeof(laddr));
933 laddr.sin_family = AF_INET;
934 laddr.sin_addr = *laddrp;
935 }
936 return (in_pcb_lport_dest(inp, laddrp ? (struct sockaddr *) &laddr :
937 NULL, lportp, NULL, 0, cred, lookupflags));
938}
939
940/*
941 * Return cached socket options.

Callers 2

in_pcbbind_setupFunction · 0.85
in6_pcbsetportFunction · 0.85

Calls 1

bzeroFunction · 0.85

Tested by

no test coverage detected