GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
IPNAT(4) FreeBSD Kernel Interfaces Manual IPNAT(4)

̾??

ipnat - ?ͥåȥ?????ɥ쥹?Ѵ? (NAT) ?Υ????ͥ륤?󥿥ե?????

#include <netinet/ip_compat.h>
#include <netinet/ip_fil.h>
#include <netinet/ip_proxy.h>
#include <netinet/ip_nat.h>

NAT ?ꥹ?Ȥ˥롼?????ɲä????Ӻ??????뤿???ˡ? 2 ?Ĥ? `????Ū' ?? ioctl ???󶡤????Ƥ??ޤ??? ioctl ?ϲ????Τ褦?˸ƤФ??ޤ?:

	ioctl(fd, SIOCADNAT, struct ipnat *)
	ioctl(fd, SIOCRMNAT, struct ipnat *)

ipf(4) ?Ȥϰۤʤꡢ?????ͥ??? NAT ???󥿥ե??????ˤ??ä? ???ݡ??Ȥ????Ƥ????ꥹ?Ȥ? 1 ?Ĥ????Ǥ??? ư?????Υꥹ?Ȥȸ򴹲?ǽ????ư?????Υꥹ?Ȥε?ǽ?ϡ? ???ߤϥ??ݡ??Ȥ????Ƥ??ޤ?????

?嵭?? ioctl ?ϡ??롼?ƥ????? ioctl ?Ȥ??ƿ??񤦤褦?? ?????????Ƥ????Τǡ??Ƽ??Υ롼?ƥ????? ioctl ???Ѥ??????Τ? Ʊ???롼?????ե????뵭?һҤ????Ѥ????ޤ??? ?????Ƥ??ξ??? fd ?ϡ????Υ⥸?塼???˴?Ϣ???? ?ǥХ??? (?㤨?? /dev/ipl) ?Υե????뵭?һҤǤ??뤳?Ȥ?ɬ?פǤ???

NAT ???󥿥ե????????Ѥ??????빽¤?Τϰʲ????̤??Ǥ?:

typedef struct  ipnat   {

struct ipnat *in_next;
void *in_ifp;
u_short in_flags;
u_short in_pnext;
u_short in_port[2];
struct in_addr in_in[2];
struct in_addr in_out[2];
struct in_addr in_nextip;
int in_space;
int in_redir; /* 0 ?ޥåפ????Ƥ??롢1 ???????쥯?ȤϺ??? */
char in_ifname[IFNAMSIZ]; } ipnat_t; #define in_pmin in_port[0] /* ??Ū?ʥ??????쥯?ȥݡ??Ȥ??ݻ? */ #define in_pmax in_port[1] #define in_nip in_nextip.s_addr #define in_inip in_in[0].s_addr #define in_inmsk in_in[1].s_addr #define in_outip in_out[0].s_addr #define in_outmsk in_out[1].s_addr

in_redir ??ǧ??????????:

#define NAT_MAP         0
#define NAT_REDIRECT    1

NAT ????

?ޥåפ??줿?ѥ??åȤο????????????줿?ѥ??åȤο? ?˴ؤ??????פ??μ褵???ޤ??? ?ޤ???NAT ?ơ??֥??˿????Υ????ȥ꤬?ɲä??줿?ꡢ (?????ڤ??Τ?????) ?????ȥ꤬???????줿?????丽?ߤ? NAT ?ơ??֥??? ?????̤˴ؤ??????פ??μ褵???ޤ???

?????ͥ??????ˤ??? NAT ?ơ??֥??ؤΥݥ??󥿤ȡ? SIOCADNAT ioctl ???Ȥ?Ω?Ƥ??줿?????? NAT ?ꥹ?Ȥ? ??Ƭ?ؤΥݥ??󥿤????????ޤ???

???Υơ??֥뼫?Ȥϡ?NAT_SIZE (?ǥե????ȤǤ? 367) ???礭???? ?ϥå????ơ??֥??Ǥ???

???פ??????????ˤϡ?SIOCGNATS ioctl ???Ѥ??ơ? Ŭ?ڤʹ?¤?Τ??ʲ??Τ褦?˻??Ȥ??Ϥ?ɬ?פ??????ޤ?:

	ioctl(fd, SIOCGNATS, struct natstat *)
typedef struct  natstat {

u_long ns_mapped[2];
u_long ns_added;
u_long ns_expire;
u_long ns_inuse;
nat_t ***ns_table;
ipnat_t *ns_list; } natstat_t;

?ե??륿?롼?????ɲä??????????äȽ????ˤǤ??????ɤ??Ǥ??礦??

/dev/ipnat

ipf(4), ipnat(5), ipf(8), ipnat(8), ipfstat(8)


Search for    or go to Top of page |  Section 4 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.