SLIDE 9 9
to_addr.sas_family=AF_ATMSVC ; addr.sas_addr.prv[19]=10; connect(s,&to_addr, sizeof(to_addr)); write(s, buf, amt);
Linux ATM API – Code example
Different Parts
bind(s,&addr, sizeof(addr)); listen(s, 3); m=accept(s,&conn,&connlen); rc=read(m, buf, 256);
Note: You may also need to bind address in sender side.
/*set address */ text2atm(txt, &addr, sizeof(addr),T2A_SVC|T2A_NAME); addr.sas_family=AF_ATMSVC; addr.sas_addr.prv[19]=10;
Server Side Client Side
Name service
- Use local configure file: /etc/hosts.atm
– Format: numeric_address host name – Numeric address:
Now we use
13-byte net addr 6-byte MAC addr 0x00
– Manage address Use command atmaddr
2)
Use ilmid, automatic name configuration, ANS needed
ATM Address Management