Pack and unpack Radius VSA attributes

Hi
As far as I know there are some methods to pack radius VSA attributes. Here are:
As the part of Cisco-AVPair
26 - VSA
Length
9  - Vendor ID
1  - Vendor Type (Cisco-AVPair Attribute ID)
Attribute Name=Value
In the Vendor Specific attribute ("throught attribute ID")
26  - VSALength
9 - Vendor ID
2 - Vendor Type (Attribute ID)
Vendor Length
Attribute Name=Value
In the Vendor Specific attribute ("throught attribute ID") 
26 - VSA
Length
9 - Vendor ID
2 - Vendor Type (Attribute ID)
Value
i.e. with attribute name and witout.
How to understand which attribute needs attribute name in value string?
For example:
26|Length|9|2|Vendor Length|1|h323-incoming-conf-id=82b5fc8cd6f411dfa3c6080027716a9a
26|Length|9|2|Vendor Length|35|h323-incoming-conf-id=82b5fc8cd6f411dfa3c6080027716a9a
26|Length|9|2|Vendor Length|35|82b5fc8cd6f411dfa3c6080027716a9a
which of the methods is right?

Hi,
For the specific VSA you used in the example (h323-incoming-conf-id), (1) is the correct encoding, since Cisco VSA vendor type 1 (also more commonly referred to as  cisco AV Pair) is always encoded in strings with the format of "attribute=value". This applies to other cisco VSAs that use string encoding as well. For VSA's that don't use string encoding, eg., fax-pages (vendor type 5, encoding integer), it typically doesn't include the value. You should be able to check that against the vendor dictionary to confirm. Please also see:
http://www.cisco.com/en/US/docs/ios/voice/cdr/developer/guide/cdrdefs.html
Thanks,
Wen

Similar Messages

  • Pack and unpack in ABAP objects

    can anyone explain me how to pack or unpack a field inside a method which is inside a class.

    Hi
    See the doc of PACK and UNPACK
    PACK source TO destination.
    This statement, <b>which is forbidden in classes</b>, converts the content of the data object source to the data type p of length 16 without decimal places. In contrast to the conversion rules for elementary data types, a decimal separator in source is ignored. This assigns the converted content to the data object destination.
    The data type of source must be character-type, flat, and its content must be interpretable as a numeric value. The data type of destination must be flat. If destination has the data type p, the interim result is assigned to it from left to right. Surplus characters are cut off on the left, and the decimal places are determined by the data type of destination. If destination does not have the data type p, the interim result is converted to the data type of destination according to the rules in the conversion table for source field type p.
    UNPACK source TO destination.
    This statement converts the content of the data object source according to a specific rule and assigns the converted content to data object destination. For source, the data type p of length 16 without decimal places is expected. The data type of destination must be character-type and flat.
    The conversion is performed according to the following rules:
    If the data type of source is not of the type p with length 16 and without decimal places, then the content of source is converted to this data type. Contrary to the rules described in conversion rules for elementary data types, any decimal separator in source is completely ignored.
    The digits of the interim result are assigned to data object destination right-aligned and without +/- sign. Any additional places in destination are filled with leading zeros. If the length of destination is not sufficient, the assigned variable is truncated from the left.
    Reward points for useful Answers
    Regards
    Anji

  • Packing and Unpacking BITS from a SHORT

    Hello everyone,
    I am have six pieces of data packed into a 16bit short value and I am wondering if my code to pack and unpack the short looks right to everyone else. The six smaller values that I am pulling out of the short are of the length (in order) 2+2+3+3+3+3 bits . My approach to unpacking the short is applying a bitmask to isolate just the sub-value I want, then using the bitwise-left shift ( << operator) to move that value to the 0-position in the short, then casting the value to a byte for use in my program. The code to do that looks something like this:
    public final short maskValue1 = Short.parseShort("0000000000000011", 2);
    public final short maskValue2 = Short.parseShort("0000000000001100", 2);
    public final short maskValue3 = Short.parseShort("0000000001110000", 2);
    public final short maskValue4 = Short.parseShort("0000001110000000", 2);
    public final short maskValue5 = Short.parseShort("0001110000000000", 2);
    public final short maskValue6 = Short.parseShort("111000000000000", 2);
         public void unpackEncodedMap(short map, byte[] outMap) {
              outMap[0] = (byte)((map & maskValue1) << 14);
              outMap[1] = (byte)((map & maskValue2) << 12);
              outMap[2] = (byte)((map & maskValue3) << 9);
              outMap[3] = (byte)((map & maskValue4) << 6);
              outMap[4] = (byte)((map & maskValue5) << 3);
              outMap[5] = (byte)(map & maskValue6);
    The approach I use to encode the short value involves taking my input byte array and casting each into a short. Then I use the bitwise-right shift operator ( >> ) to move the bit value into the appropriate position. To apply the next byte-value I bitwise-OR the previous value onto the new mask. The values in the byte-array are assured not to be greater then their sub-value bit lengths ... so the downcast is all right. Here is my code to do the packing:
         public short encodeMap(byte[] mymap) {
              short out = (short)(((short)mymap[0]) >> 2);
              out = (short)((out | ((short)mymap[1])) >> 2);
              out = (short)((out | ((short)mymap[2])) >> 3);
              out = (short)((out | ((short)mymap[3])) >> 3);
              out = (short)((out | ((short)mymap[4])) >> 3);
              out = (short)(out | ((short)mymap[5]));
              return out;
    Thanks for looking at my functions and point out any inconsistencies. I feel like there is something I am not seeing in my code. Thanks!

    Well...thanks for the one-line answer :) yes, in the sense that it compiles and runs, but I am not sure if there is a problem with my logic or not.My program is acting strange and I am trying to isolate my problem, I think the problem might be in my pack/unpack methods.... possibly in my bit-math.

  • WebLogic Pack and Unpack

    When you pack and unpack the domain from one server to another server, config.xml is missing while we unpack the same,
    here we would like to know, do we need to metion the same path(Same folder structure) while pack and unpack?

    Hi
    Yes, one of the basic requirements is all the Machines should have Absolutely same version of Weblogic Software and in the same folder structure. The reason is when we run Pack command on the main master domain, it does store the full folder structure of some folders that has all the modules. So when you run UnPack on this other machine, basically it will unpack. But runtime, if folder structure is not matching, the most common error you may get is like Java home not found, middleware home not found and ofcourse ends up with all NoClassDefFound errors.
    Hence the folder structure should be same. And one more thing. After running unpack command, immediately you will NOT see any managed server folders under your domain/servers. That folder will be still Empty only. Only when you start the managed server like startManagedWeblogic.cmd myMS1 adminurl, thats when under domain/servers you will see a new folder named "myMS1" which is the name of managed server that you gave when you created the main master domain and packed it. Also, note it will prompt for username and password. ALSO, everytime you start managed servers, it will go to Admin Server and get some important files like config.xml file, jdbc files and few other config files and mainly all the LDAP files. Basically everytime it Syncs from AdminServer. So do NOT make any changes to any files on ManagedServer. Because when you restart they will get overwritten by admin files.
    Thanks
    Ravi Jegga

  • Pack and unpack a JFrame

    Hi,
    I'm using a JFrame and I 'd like to put a JButton to pack and unpack the window. Now, the pack is simple (I use the pack() method), but to enlarge the window? I've tried to store the original size before pack, and then resize the window but, since I use a BorderLayout layout manager the center panel doen't return visible.
    can anyone help me?

    You likely are not calling validate() on the layout after the resize
    Eximport javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Test extends JFrame implements ActionListener
       private JPanel p;
       private Rectangle r;
       public Test()
          super("Flip");
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          setSize(770,580);
          p = new JPanel(new BorderLayout());
          JPanel p2 = new JPanel(new FlowLayout());
          p2.add(new JLabel("North"));
          p.add(p2, BorderLayout.NORTH);
          p2 = new JPanel(new FlowLayout());
          p2.add(new JLabel("West"));
          p.add(p2, BorderLayout.WEST);
          p2 = new JPanel(new FlowLayout());
          p2.add(new JLabel("East"));
          p.add(p2, BorderLayout.EAST);
          p2 = new JPanel(new FlowLayout());
          p2.add(new JLabel("Center"));
          p.add(p2, BorderLayout.CENTER);
          p2 = new JPanel(new FlowLayout());
          JButton pack = new JButton("Pack");
          JButton unpack = new JButton("Unpack");
          pack.addActionListener(this);
          unpack.addActionListener(this);
          p2.add(pack);
          p2.add(unpack);
          p.add(p2, BorderLayout.SOUTH);
          setContentPane(p);
       public void actionPerformed(ActionEvent ae)
          String s = ae.getActionCommand();
          if(s.equals("Pack"))
             r= getBounds();
             pack();
          else
             setBounds(r);
             validate();
       public static void main(String[] args)
          new Test().setVisible(true);
    }

  • Pack and Unpack in HU

    Hi MM Gurus,
    I have a requirement of packing one HU of say 5EA Qty and Unpack in two HUs say 4EA & 1EA.Is this scenario is  possible in Handling Unit Management. If possible please explain.
    Regards,
    Manikyappa

    hi,
    if you have handling unit management activated (TVSHP-EXIDV_UNIQUE), you can create HUs within hu02. Here you can pack the f.e. 5 pieces into one HU or also unpack it into two HUs with 4+1 pieces (add material, total quantity, plant and storage location and the packaging material -> select these to lines and push "pack" button in the middle of the screen for packing it; to unpack HUs use the "empty" or "delete HU" button on the left side of the screen, after this you can pack again like you want... you have several possibilities to create HUs within this transaction). You can also use transaction humo for changing HUs (and for a lot of useful things used with HUs).
    (If you do not have handling unit management activated, you can only create shipping units within a delivery (you have the same screen there as in hu02).)
    I hope I could help you.
    Regards, Ely

  • Hanlding Unit Pack and Unpack Function module

    Hi All,
        Can any one know the functiona modules for PACK Handling Unit and UNPACK Handling Unit? If so please reply me.
    Thanks,
      Pranav

    Hi,
    Please check this FM.
    PACK_HANDLING_UNIT
    UNPACK_HANDLING_UNIT
    Hope this will help.
    Regards,
    Ferry Lianto

  • Changing WL port using pack and unpack Commands

    Hi,
    I am an experienced WL8 user, just starting with WL9.
    I created a first domain relatively easily using "config.sh"; and after finishing this proof of concept thought that it might be a good idea to create a template from it for the rest of the guys here.
    For that I used the ?pack? command, which works fine.
    The completing ?unpack? command also seems to works fine.
    The only thing is that I fail to locate any option to determine the server?s listen port (always sets to be 7001 like my original domain), and this is problem because we all work on the same linux machine.
    The only option I found so far is to start the server on it original port (7001) and than change it using the admin console. This is not good enough since we want to use an automatic install wizard?
    Did I miss something?
    Is there any command line to help?
    Or any other tips?
    Your help is appreciated,
    zilbi

    Hi Again,
    solved it using the WLST offline tool.
    the script (customCmpDomain.py):
    #=======================================================================================
    # Open the domain template.
    #=======================================================================================
    readTemplate("cmpDomainTemplate.jar")
    #=======================================================================================
    # Change server's port
    #=======================================================================================
    cd('Servers/AdminServer')
    set('ListenPort', 7080)
    #=======================================================================================
    # Open (unpack) the domain.
    #=======================================================================================
    writeDomain("/home/rami/domains/cmpDomain")
    #=======================================================================================
    # Close & Exit
    #=======================================================================================
    closeTemplate()
    exit()
    and just run it using 'weblogic.WLST'
    thanks anyway!
    zilbi

  • String pack and unpack

    Hi, i�m having trouble trying to write a methode to unpack a string packed with the following methode.
    can some one tell me how to write the unpack methode ?
    thanks.
    public String pack(String s) {
    byte[] a = new byte[16];
    //If the string is an odd length then pack with an F
    if ( s.length() % 2 == 1 ) {  
    s = (char) 0xFF + s ;
    //Now pack each pair of bytes into the array
    for ( int i = 0, j = 0 ; i < s.length() ; i += 2, j++ ) {
    a[j] = (byte) ( ( (s.charAt(i) & 0x0F) << 4 ) +
    (s.charAt(i+1) & 0x0F) ) ;
    return new String(A);
    }

    You need know the assumptions about the content of the original string. A packing algorithm like the one you describe might be used to pack a numeric string into an array of bytes. In that case, you assume that the original string consisted of nothing but ASCII digits, and you can recover the string with the following method:
    public String unpack(String a) {
      byte [] b = a.getBytes();
      StringBuffer buff = new StringBuffer(b.length * 2);
      for (int i = 0; i < b.length; i++) {
        buff.append((char)(0x30 | ((b[i] & 0xf0) >> 4)));
        buff.append((char)(0x30 | (b[i] & 0x0f)));
      // If the first char was a pad char, then remove it
      if (buff.charAt(0) == (char)0x3f)
        return buff.substring(1);
      return buff.toString();
    }

  • Pack and unpack

    Hi
    Please do help me.
      Data: dmshb(11),             "amount in SEK or EUR
              amount_1    LIKE dfkkop-betrw.  " of length 13 and decimal 2 with +/-sign
      amount_1 = '   91111111.00-'.
      dmshb = amount.
    the result of this is   dmshb = *111111.00-
    the expected is  dmshb = 09111111100
    Please do tell me the logic to do this
    promise to reward points
    bye
    Mac

    Hi Madan,
    This is your code.
    REPORT ZTEST_TEST01 .
    Data: dmshb(11), "amount in SEK or EUR
    amount_1 type netpr. " of length 13 and decimal 2 with +/-sign
    amount_1 = ' 91111111.00-'.
    unpack amount_1 to dmshb.
    *dmshb = amount_1.
    write: / 'amount', amount_1 ,
             'dmshhb', dmshb.
    Regards,
    Raghav

  • HT201441 dear sir . Ihave bought a dell ipad under serial number DMPKQFF4F186 on 25th of dec.2013,it was packed and seems it was .new,after unpacking i found out it is lock. I just need to know when this serial number has registered in icloud. I will grat

    dear sir . I have bought a dell ipad under serial number DMPKQFF4F186 / UDID : 976ba8f5ba16f665bdf3b1b5ec53a172c9d65381. on 25th of dec.2013,it was packed and seems it was new after unpacking i found out it is locked.Ijust neednto know when this serial number has registered in icloud. I will grateful if you could let me this information. locking forward to your kind response.  With Regards

    Greetings,
    I've never seen this issue, and I handle many iPads, of all versions. WiFi issues are generally local to the WiFi router - they are not all of the same quality, range, immunity to interference, etc. You have distance, building construction, and the biggie - interference.
    At home, I use Apple routers, and have no issues with any of my WiFi enabled devices, computers, mobile devices, etc - even the lowly PeeCees. I have locations where I have Juniper Networks, as well as Aruba, and a few Netgears - all of them work as they should.
    The cheaper routers, Linksys, D-Link, Seimens home units, and many other no name devices have caused issues of various kinds, and even connectivity.
    I have no idea what Starbucks uses, but I always have a good connection, and I go there nearly every morning and get some work done, as well as play.
    You could try changing channels, 2.4 to 5 Gigs, changing locations of the router. I have had to do all of these at one time or another over the many years that I have been a Network Engineer.
    Good Luck - Cheers,
    M.

  • RADIUS VSAs for Airespace and ACS 3.3

    How/Where do we get the RADIUS VSA downloads for ACS 3.3 for the Airespace hardware?
    I can only find reference to them in ACS 4.0 documentation.

    Did you manage to get these???
    Cheers,
    Dean

  • Adding RADIUS VSAs on ACS 3.2 SE

    I have tried to add a VSA to enable a Packeteer to authenticate using RADIUS on the ACS.
    Using RDBMS synchronization to import the csv file below.
    SequenceId,Priority,GroupName,Action,ValueName ,Value1,Value2,Value3
    1,1,External,163,26,access=look,2334,1
    The group name is 'External', Action is 163 which corresponds to ADD_RADIUS_ATTR.
    From RDBMS Sychronization Import Definitions (http://www.cisco.com/univercd/cc/td/doc/product/access/acs_soft/csacs4nt/acs32/user/ag.htm#wp35130)
    To add a vendor-specific attribute (VSA), set VN = "26" and use V2 and V3 as follows:
    •V2 = IETF vendor ID (which in this case is 2334)
    •V3 = VSA attribute ID (1)
    •V1 = In this case 'access=look'
    After a couple of attempts I got the format correct but when I try and import the file I don't get an "INFO" message in the "Reports" section of the ACS indicating that the process was successful. I don't get any message at all, WARNING, ERROR or INFO.
    From the FTP server I can confirm that the file was transferred.
    What I should get is an INFO message similar to:
    08/30/2004 16:27:50 INFO Sync complete: 1 transaction(s) 0 parse error(s) 0 process error(s)
    Any ideas as to what is wrong would be much appreciated.
    Cheers,
    Aylmer.

    HI you need to import the RADIUS VSA for PAcketeer from their site.
    The link to the steps as shown below is ( might require u to subscribe & login)
    https://packeteer.custhelp.com/cgi-bin/packeteer.cfg/php/enduser/std_adp.php?p_faqid=399&p_created=1046793530&p_sid=gszcDFBh&p_lva=&p_sp=cF9zcmNoPTEmcF9zb3J0X2J5PWRmbHQmcF9ncmlkc29ydD0mcF9yb3dfY250PTImcF9wcm9kcz0wJnBfY2F0cz0wJnBfcHY9JnBfY3Y9JnBfc2VhcmNoX3R5cGU9YW5zd2Vycy5zZWFyY2hfZm5sJnBfcGFnZT0xJnBfc2VhcmNoX3RleHQ9YWNz&p_li=&p_topview=1
    IN any case the same content is copied below:-
    Also the stpes on how to do them is listed here
    Create a User Defined Vendor
    First, you need to create a User Defined Vendor.
    1. Create a text file (packet.ini) and enter the following:
    [User Defined Vendor]
    Name=Packeteer
    IETF Code=2334
    VSA 1=Packeteer-AVPair
    [Packeteer-AVPair]
    Type=STRING
    Profile=OUT
    2. Name the file packet.ini.
    Add the Vendor to the Database
    Next, you need to add the above vendor to the database.
    1. Go to the command prompt, and change the directory to the Cisco Secure utils directory (typically C:\Program Files\CiscoSecure ACS v3.0\Utils).
    2. The instructions below install the vendor into User Defined slot 0. If you have other vendors, you need to change this number to a free slot. To see a list of slots and their assignments, use the csutil -listudv command. For example:
    C:\Program Files\CiscoSecure ACS v3.0\Utils>csutil -listudv
    CSUtil v3.0(2.5), Copyright 1997-2002, Cisco Systems Inc
    UDV 0 - Unassigned
    UDV 1 - Unassigned
    UDV 2 - Unassigned
    UDV 3 - Unassigned
    UDV 4 - Unassigned
    UDV 5 - Unassigned
    UDV 6 - Unassigned
    UDV 7 - Unassigned
    UDV 8 - Unassigned
    UDV 9 - Unassigned
    3. Run csutil -addudv to and add Packeteer to UDV (User Defined Vendor) slot 0 or the next
    open slot.
    C:\Program Files\CiscoSecure ACS v3.0\Utils>csutil -addudv 0 c:\temp\packet.ini
    CSUtil v3.0(2.5), Copyright 1997-2002, Cisco Systems Inc
    Adding or removing vendors requires ACS services to be re-started.
    Please make sure regedit is not running as it can prevent registry
    backup/restore operations
    Are you sure you want to proceed? (y/n)y
    Parsing [c:\temp\packet.ini] for addition at UDV slot [0]
    Stopping any running services
    Creating backup of current config
    Adding Vendor [Packeteer] added as [RADIUS (Packeteer)]
    Adding VSA [Packeteer-AVPair]
    Done
    Checking new configuration...
    New configuration OK
    Re-starting stopped services
    Verify that Packeteer was added.
    C:\Program Files\CiscoSecure ACS v3.0\Utils>
    C:\Program Files\CiscoSecure ACS v3.0\Utils>csutil -listudv
    CSUtil v3.0(2.5), Copyright 1997-2002, Cisco Systems Inc
    UDV 0 - RADIUS (Packeteer)
    UDV 1 - Unassigned
    UDV 2 - Unassigned
    UDV 3 - Unassigned
    UDV 4 - Unassigned
    UDV 5 - Unassigned
    UDV 6 - Unassigned
    UDV 7 - Unassigned
    UDV 8 - Unassigned
    UDV 9 - Unassigned
    4. Return to ACS Admin and select Network Configuration.
    From the main screen select Network Configurtion and add the PacketShaper by supplying the AAA client Hostname, IP address: , Key. Scroll through the Authenticate Using choices and select RADIUS (Packeteer).
    5. From the main screen select User Setup and enter a user name for a Touch or Look access user to the Packet Shaper. Supply the PAP/CHAP password. Leave other fields at defaults and scroll to the bottom
    of the form. Be sure the Packeteer-AVPair box is selected and supply either
    "access=touch" or "access=look" in the available entry space.

  • Can't create VSA Attributes in ACS 5.1

    I have upgraded to ACS 5.1 inorder to use the RADIUS VSA feature that was added. I'm able to create the VSA Vendor object but get an error when creating the actual attributes. Therror states: This System Failure occured: {0}. Your changes have not been saved. Click OK to return to the list page. Does anyone else get this error?

    Mine is a clean installation. Version is 5.1.0.44 (
    Internal Build ID : B.2347)
    Although I can't recreate, I do have a couple more suggestions to try:
    - Enter a Vendor name as a single word (no spaces or other characters)
    - There are two ways to navigate to the attributes page
    1) System Administration > ... >
    Configuration >
    Dictionaries >
    Protocols >
    RADIUS >
    RADIUS VSA and then select "Show Vendor Attributes"2) Clicking on name of vendor in left nav and then pressing "Create"
    Suggest to try both ways of adding an attribute

  • Cisco ISE with both internal and External RADIUS Server

    Hi
    I have ISE 1.2 , I configured it as management monitor and PSN and it work fine
    I would like to know if I can integrate an external radius server and work with both internal and External RADIUS Server simultanously
    So some computer (groupe_A in active directory ) will continu to made radius authentication on the ISE internal radius and other computer (groupe_B in active directory) will made radius authentication on an external radius server
    I will like to know if it is possible to configure it and how I can do it ?
    Thanks in advance for your help
    Regards
    Blaise

    Cisco ISE can function both as a RADIUS server and as a RADIUS proxy server. When it acts as a proxy server, Cisco ISE receives authentication and accounting requests from the network access server (NAS) and forwards them to the external RADIUS server. Cisco ISE accepts the results of the requests and returns them to the NAS.
    Cisco ISE can simultaneously act as a proxy server to multiple external RADIUS servers. You can use the external RADIUS servers that you configure here in RADIUS server sequences. The External RADIUS Server page lists all the external RADIUS servers that you have defined in Cisco ISE. You can use the filter option to search for specific RADIUS servers based on the name or description, or both. In both simple and rule-based authentication policies, you can use the RADIUS server sequences to proxy the requests to a RADIUS server.
    The RADIUS server sequence strips the domain name from the RADIUS-Username attribute for RADIUS authentications. This domain stripping is not applicable for EAP authentications, which use the EAP-Identity attribute. The RADIUS proxy server obtains the username from the RADIUS-Username attribute and strips it from the character that you specify when you configure the RADIUS server sequence. For EAP authentications, the RADIUS proxy server obtains the username from the EAP-Identity attribute. EAP authentications that use the RADIUS server sequence will succeed only if the EAP-Identity and RADIUS-Username values are the same.

Maybe you are looking for