mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 12:31:27 +08:00
Update to FreeBSD head 2018-02-01
Git mirror commit d079ae0442af8fa3cfd6d7ede190d04e64a2c0d4. Update #3472.
This commit is contained in:
@@ -165,7 +165,7 @@ cnfp_v1_print(netdissect_options *ndo, const u_char *cp)
|
||||
{
|
||||
register const struct nfhdr_v1 *nh;
|
||||
register const struct nfrec_v1 *nr;
|
||||
struct protoent *pent;
|
||||
const char *p_name;
|
||||
int nrecs, ver;
|
||||
#if 0
|
||||
time_t t;
|
||||
@@ -217,14 +217,13 @@ cnfp_v1_print(netdissect_options *ndo, const u_char *cp)
|
||||
|
||||
ND_PRINT((ndo, ">> %s\n ", intoa(nr->nhop_ina.s_addr)));
|
||||
|
||||
pent = getprotobynumber(nr->proto);
|
||||
if (!pent || ndo->ndo_nflag)
|
||||
ND_PRINT((ndo, "%u ", nr->proto));
|
||||
if (!ndo->ndo_nflag && (p_name = netdb_protoname(nr->proto)) != NULL)
|
||||
ND_PRINT((ndo, "%s ", p_name));
|
||||
else
|
||||
ND_PRINT((ndo, "%s ", pent->p_name));
|
||||
ND_PRINT((ndo, "%u ", nr->proto));
|
||||
|
||||
/* tcp flags for tcp only */
|
||||
if (pent && pent->p_proto == IPPROTO_TCP) {
|
||||
if (nr->proto == IPPROTO_TCP) {
|
||||
int flags;
|
||||
flags = nr->tcp_flags;
|
||||
ND_PRINT((ndo, "%s%s%s%s%s%s%s",
|
||||
@@ -255,7 +254,7 @@ cnfp_v5_print(netdissect_options *ndo, const u_char *cp)
|
||||
{
|
||||
register const struct nfhdr_v5 *nh;
|
||||
register const struct nfrec_v5 *nr;
|
||||
struct protoent *pent;
|
||||
const char *p_name;
|
||||
int nrecs, ver;
|
||||
#if 0
|
||||
time_t t;
|
||||
@@ -314,14 +313,13 @@ cnfp_v5_print(netdissect_options *ndo, const u_char *cp)
|
||||
|
||||
ND_PRINT((ndo, ">> %s\n ", intoa(nr->nhop_ina.s_addr)));
|
||||
|
||||
pent = getprotobynumber(nr->proto);
|
||||
if (!pent || ndo->ndo_nflag)
|
||||
ND_PRINT((ndo, "%u ", nr->proto));
|
||||
if (!ndo->ndo_nflag && (p_name = netdb_protoname(nr->proto)) != NULL)
|
||||
ND_PRINT((ndo, "%s ", p_name));
|
||||
else
|
||||
ND_PRINT((ndo, "%s ", pent->p_name));
|
||||
ND_PRINT((ndo, "%u ", nr->proto));
|
||||
|
||||
/* tcp flags for tcp only */
|
||||
if (pent && pent->p_proto == IPPROTO_TCP) {
|
||||
if (nr->proto == IPPROTO_TCP) {
|
||||
int flags;
|
||||
flags = nr->tcp_flags;
|
||||
ND_PRINT((ndo, "%s%s%s%s%s%s%s",
|
||||
@@ -352,7 +350,7 @@ cnfp_v6_print(netdissect_options *ndo, const u_char *cp)
|
||||
{
|
||||
register const struct nfhdr_v6 *nh;
|
||||
register const struct nfrec_v6 *nr;
|
||||
struct protoent *pent;
|
||||
const char *p_name;
|
||||
int nrecs, ver;
|
||||
#if 0
|
||||
time_t t;
|
||||
@@ -411,14 +409,13 @@ cnfp_v6_print(netdissect_options *ndo, const u_char *cp)
|
||||
|
||||
ND_PRINT((ndo, ">> %s\n ", intoa(nr->nhop_ina.s_addr)));
|
||||
|
||||
pent = getprotobynumber(nr->proto);
|
||||
if (!pent || ndo->ndo_nflag)
|
||||
ND_PRINT((ndo, "%u ", nr->proto));
|
||||
if (!ndo->ndo_nflag && (p_name = netdb_protoname(nr->proto)) != NULL)
|
||||
ND_PRINT((ndo, "%s ", p_name));
|
||||
else
|
||||
ND_PRINT((ndo, "%s ", pent->p_name));
|
||||
ND_PRINT((ndo, "%u ", nr->proto));
|
||||
|
||||
/* tcp flags for tcp only */
|
||||
if (pent && pent->p_proto == IPPROTO_TCP) {
|
||||
if (nr->proto == IPPROTO_TCP) {
|
||||
int flags;
|
||||
flags = nr->tcp_flags;
|
||||
ND_PRINT((ndo, "%s%s%s%s%s%s%s",
|
||||
|
Reference in New Issue
Block a user