p4-dev@lists.p4.org

list for questions/discussion of p4 programs and tools

View all threads

p4_16 - hardcoded IP addresses

FM
Francisco Machado
Tue, Apr 20, 2021 2:50 PM

Hi,
I'm working on a NAT that doesn't involve a controller to change its IP
address and ports. Is it possible to define an IP, for example, like:
" hdr.ipv4.srcAdd = 0A00000A "

I am having some troubles with that.

Thanks in advance,
All the best

Hi, I'm working on a NAT that doesn't involve a controller to change its IP address and ports. Is it possible to define an IP, for example, like: " hdr.ipv4.srcAdd = 0A00000A " I am having some troubles with that. Thanks in advance, All the best
NS
Nik Sultana
Tue, Apr 20, 2021 2:53 PM

On Tue, 20 Apr 2021, Francisco Machado wrote:

Hi,
I'm working on a NAT that doesn't involve a controller to change its IP
address and ports. Is it possible to define an IP, for example, like:
" hdr.ipv4.srcAdd = 0A00000A "

I am having some troubles with that.

Thanks in advance,
All the best


P4-dev mailing list -- p4-dev@lists.p4.org
To unsubscribe send an email to p4-dev-leave@lists.p4.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

On Tue, 20 Apr 2021, Francisco Machado wrote: > Hi, > I'm working on a NAT that doesn't involve a controller to change its IP > address and ports. Is it possible to define an IP, for example, like: > " hdr.ipv4.srcAdd = 0A00000A " > > I am having some troubles with that. > > Thanks in advance, > All the best > _______________________________________________ > P4-dev mailing list -- p4-dev@lists.p4.org > To unsubscribe send an email to p4-dev-leave@lists.p4.org > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s Have you tried literal constants? https://p4.org/p4-spec/docs/P4-16-v1.2.1.html#sec-literals -- www.seas.upenn.edu/~nsultana