Date: Tue, 20 Jul 1999 23:19:49 -0700 (PDT) From: rhtiwari@cygsoft.com To: freebsd-gnats-submit@freebsd.org Subject: kern/12729: Missing function pointer initialization in Network code Message-ID: <19990721061949.1075115140@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 12729 >Category: kern >Synopsis: Missing function pointer initialization in Network code >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jul 20 23:20:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Ratnakar Tiwari >Release: >Organization: Cygnet Software Pvt. Ltd. >Environment: >Description: Hi, I am trying to figure out how Network Address Translation works and I was going through the FreeBSD source code for it.This source code was downloaded from: ftp.FreeBSD.org/pub/FreeBSD/FreeBSD-stable/src/sys/netinet . In file ip_input.c on line 163 you are declaring a pointer: ip_nat_t *ip_nat_ptr ; ip_nat_t is a function type defined in ip_fw.h as typedef int ip_nat_t __P((struct ip **, struct mbuf **, struct ifnet *, int)); __P is a macro defined in ip_compat.h The function pointer ip_nat_ptr is used on line 441 of ip_input.c as: if (ip_nat_ptr && !(*ip_nat_ptr)(&ip, &m, m->m_pkthdr.rcvif, IP_NAT_IN) However I was unable to determine where this pointer is being initialized. Could somebody please explain to me what exactly is going on in the code? Thanks. Ratnakar >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990721061949.1075115140>