anchor.diff:  %% @doc Searches for an attribute in a RADIUS protocol attributes list.
   %%
   find(Attribute, Attributes) ->
  -	orddict:find(Attribute, Attributes).
  +	case lists:keyfind(Attribute, 1, Attributes) of
  +		false ->
  +			{error, not_found};
  +		{Attribute, Value} ->
  +			{ok, Value}
  +	end.
  +
  +-spec get_all(Attribute :: byte(), Attributes :: attributes()) ->
  +	[Value :: term()].
  +%% @doc Returns all values for an `Attribute` which may occur
  +%% 	more than once in	the RADIUS protocol `Attributes' list.
  +%%
  +get_all(Attribute, Attributes) ->
  +	F = fun({Name, Value}) when Name == Attribute ->
  +				{true, Value};
  +			(_) ->
  +				false
  +	end,
  +	lists:filtermap(F, Attributes).
   
   -spec codec(In :: binary() | attributes()) -> attributes() | binary().
   %% @doc Encode or decode a binary RADIUS protocol attributes field.
  
positive.code: codec(In) when is_binary(In) ->
  	attributes(In, 0, new());
  codec(In) when is_list(In) ->
  	attributes(orddict:to_list(In), <<>>).
  
  -spec hide(SharedSecret :: string(), Authenticator :: [byte()],
  	Password :: string()) -> UserPassword :: [byte()].
  
negative.code: %% @hidden
  attribute(?UserName, Value, Acc) when size(Value) >= 1 ->
  	UserName = binary_to_list(Value),
  	[{?UserName, UserName} | Acc];
  attribute(?UserPassword, Value, Acc)
  		when size(Value) >= 16, size(Value) =< 128 ->
  	UserPassword = binary_to_list(Value),
  	[{?UserPassword, UserPassword} | Acc];
  attribute(?ChapPassword, Value, Acc) when size(Value) == 17 ->
  	ChapId= binary:first(Value),
  	ChapPassword = binary:bin_to_list(Value, 1, 16),
  	[{?ChapPassword, {ChapId, ChapPassword}} | Acc];
  attribute(?NasIpAddress, Value, Acc) when size(Value) == 4 ->
  	NasIpAddress = {binary:first(Value), binary:at(Value, 1),
  			binary:at(Value, 2), binary:at(Value, 3)},
  	[{?NasIpAddress, NasIpAddress} | Acc];
  attribute(?NasPort, Value, Acc) when size(Value) == 4 ->
  	NasPort = binary:decode_unsigned(Value),
  	[{?NasPort, NasPort} | Acc];
  attribute(?ServiceType, Value, Acc) when size(Value) == 4 ->
  	ServiceType = binary:decode_unsigned(Value),
  	[{?ServiceType, ServiceType} | Acc];
  attribute(?FramedProtocol, Value, Acc) when size(Value) == 4 ->
  	FramedProtocol = binary:decode_unsigned(Value),
  	[{?FramedProtocol, FramedProtocol} | Acc];
  attribute(?FramedIpAddress, Value, Acc) when size(Value) == 4 ->
  	FramedIpAddress = {binary:first(Value), binary:at(Value, 1),
  			binary:at(Value, 2), binary:at(Value, 3)},
  	[{?FramedIpAddress, FramedIpAddress} | Acc];
  attribute(?FramedIpNetmask, Value, Acc) when size(Value) == 4 ->
  	FramedIpNetmask = {binary:first(Value), binary:at(Value, 1),
  			binary:at(Value, 2), binary:at(Value, 3)},
  	[{?FramedIpNetmask, FramedIpNetmask} | Acc];
  attribute(?FramedRouting, Value, Acc) when size(Value) == 4 ->
  	FramedRouting = binary:decode_unsigned(Value),
  	[{?FramedRouting, FramedRouting} | Acc];
  attribute(?FilterId, Value, Acc) when size(Value) >= 1 ->
  	FilterId = binary_to_list(Value),
  	[{?FilterId, FilterId} | Acc];
  attribute(?FramedMtu, Value, Acc) when size(Value) == 4 ->
  	FramedMtu = binary:decode_unsigned(Value),
  	[{?FramedMtu, FramedMtu} | Acc];
  attribute(?FramedCompression, Value, Acc) when size(Value) == 4 ->
  	FramedCompression = binary:decode_unsigned(Value),
  	[{?FramedCompression, FramedCompression} | Acc];
  attribute(?LoginIpHost, Value, Acc) when size(Value) == 4 ->
  	LoginIpHost = {binary:first(Value), binary:at(Value, 1),
  			binary:at(Value, 2), binary:at(Value, 3)},
  	[{?LoginIpHost, LoginIpHost} | Acc];
  attribute(?LoginService, Value, Acc) when size(Value) == 4 ->
  	LoginService = binary:decode_unsigned(Value),
  	[{?LoginService, LoginService} | Acc];
  attribute(?LoginTcpPort, Value, Acc) when size(Value) == 4 ->
  	LoginTcpPort = binary:decode_unsigned(Value),
  	[{?LoginTcpPort, LoginTcpPort} | Acc];
  attribute(?ReplyMessage, Value, Acc) when size(Value) >= 1 ->
  	ReplyMessage = binary_to_list(Value),
  	[{?ReplyMessage, ReplyMessage} | Acc];
  attribute(?CallbackNumber, Value, Acc) when size(Value) >= 1 ->
  	CallbackNumber = binary_to_list(Value),
  	[{?CallbackNumber, CallbackNumber} | Acc];
  attribute(?CallbackId, Value, Acc) when size(Value) >= 1 ->
  	CallbackId = binary_to_list(Value),
  	[{?CallbackId, CallbackId} | Acc];
  attribute(?FramedRoute, Value, Acc) when size(Value) >= 1 ->
  	FramedRoute = binary_to_list(Value),
  	[{?FramedRoute, FramedRoute} | Acc];
  attribute(?FramedIpxNetwork, Value, Acc) when size(Value) == 4 ->
  	FramedIpxNetwork = binary:decode_unsigned(Value),
  	[{?FramedIpxNetwork, FramedIpxNetwork} | Acc];
  attribute(?State, Value, Acc) when size(Value) >= 1 ->
  	State = binary_to_list(Value),
  	[{?State, State} | Acc];
  attribute(?Class, Value, Acc) when size(Value) >= 1 ->
  	Class = binary_to_list(Value),
  	[{?Class, Class} | Acc];
  attribute(?VendorSpecific, <<0, VendorId:24, Rest/binary>>, Acc)
  		when size(Rest) >= 1 ->
  	VendorSpecific = {VendorId, Rest},
  	[{?VendorSpecific, VendorSpecific} | Acc];
  attribute(?SessionTimeout, Value, Acc) when size(Value) == 4 ->
  	SessionTimeout = binary:decode_unsigned(Value),
  	[{?SessionTimeout, SessionTimeout} | Acc];
  attribute(?IdleTimeout, Value, Acc) when size(Value) == 4 ->
  	IdleTimeout = binary:decode_unsigned(Value),
  	[{?IdleTimeout, IdleTimeout} | Acc];
  attribute(?TerminationAction, Value, Acc) when size(Value) == 4 ->
  	TerminationAction = binary:decode_unsigned(Value),
  	[{?TerminationAction, TerminationAction} | Acc];
  attribute(?CalledStationId, Value, Acc) when size(Value) >= 1 ->
  	CalledStationId = binary_to_list(Value),
  	[{?CalledStationId, CalledStationId} | Acc];
  attribute(?CallingStationId, Value, Acc) when size(Value) >= 1 ->
  	CallingStationId = binary_to_list(Value),
  	[{?CallingStationId, CallingStationId} | Acc];
  attribute(?NasIdentifier, Value, Acc) when size(Value) >= 1 ->
  	NasIdentifier = binary_to_list(Value),
  	[{?NasIdentifier, NasIdentifier} | Acc];
  attribute(?ProxyState, Value, Acc) when size(Value) >= 1 ->
  	ProxyState = binary_to_list(Value),
  	[{?ProxyState, ProxyState} | Acc];
  attribute(?LoginLatService, Value, Acc) when size(Value) >= 1 ->
  	LoginLatService = binary_to_list(Value),
  	[{?LoginLatService, LoginLatService} | Acc];
  attribute(?LoginLatNode, Value, Acc) when size(Value) >= 1 ->
  	LoginLatNode = binary_to_list(Value),
  	[{?LoginLatNode, LoginLatNode} | Acc];
  attribute(?LoginLatGroup, Value, Acc) when size(Value) == 32 ->
  	LoginLatGroup = binary_to_list(Value),
  	[{?LoginLatGroup, LoginLatGroup} | Acc];
  attribute(?FramedAppleTalkLink, Value, Acc) when size(Value) == 4 ->
  	FramedAppleTalkLink = binary:decode_unsigned(Value),
  	[{?FramedAppleTalkLink, FramedAppleTalkLink} | Acc];
  attribute(?FramedAppleTalkNetwork, Value, Acc) when size(Value) == 4 ->
  	FramedAppleTalkNetwork = binary:decode_unsigned(Value),
  	[{?FramedAppleTalkNetwork, FramedAppleTalkNetwork} | Acc];
  attribute(?FramedAppleTalkZone, Value, Acc) when size(Value) >= 1 ->
  	FramedAppleTalkZone = binary_to_list(Value),
  	[{?FramedAppleTalkZone, FramedAppleTalkZone} | Acc];
  attribute(?AcctStatusType, Value, Acc) when size(Value) == 4 ->
  	AcctStatusType = binary:decode_unsigned(Value),
  	[{?AcctStatusType, AcctStatusType} | Acc];
  attribute(?AcctDelayTime, Value, Acc) when size(Value) == 4 ->
  	AcctDelayTime = binary:decode_unsigned(Value),
  	[{?AcctDelayTime,AcctDelayTime} | Acc];
  attribute(?AcctInputOctets, Value, Acc) when size(Value) == 4 ->
  	AcctInputOctets = binary:decode_unsigned(Value),
  	[{?AcctInputOctets, AcctInputOctets} | Acc];
  attribute(?AcctOutputOctets, Value, Acc) when size(Value) == 4 ->
  	AcctOutputOctets = binary:decode_unsigned(Value),
  	[{?AcctOutputOctets, AcctOutputOctets} | Acc];
  attribute(?AcctSessionId, Value, Acc) when size(Value) >= 1 ->
  	AcctSessionId = binary_to_list(Value),
  	[{?AcctSessionId, AcctSessionId} | Acc];
  attribute(?AcctAuthentic, Value, Acc) when size(Value) == 4 ->
  	AcctAuthentic = binary:decode_unsigned(Value),
  	[{?AcctAuthentic, AcctAuthentic} | Acc];
  attribute(?AcctSessionTime, Value, Acc) when size(Value) == 4 ->
  	AcctSessionTime = binary:decode_unsigned(Value),
  	[{?AcctSessionTime, AcctSessionTime} | Acc];
  attribute(?AcctInputPackets, Value, Acc) when size(Value) == 4 ->
  	AcctInputPackets = binary:decode_unsigned(Value),
  	[{?AcctInputPackets, AcctInputPackets} | Acc];
  attribute(?AcctOutputPackets, Value, Acc) when size(Value) == 4 ->
  	AcctOutputPackets = binary:decode_unsigned(Value),
  	[{?AcctOutputPackets, AcctOutputPackets} | Acc];
  attribute(?AcctTerminateCause, Value, Acc) when size(Value) == 4 ->
  	AcctTerminateCause = binary:decode_unsigned(Value),
  	[{?AcctTerminateCause, AcctTerminateCause} | Acc];
  attribute(?AcctMultiSessionId, Value, Acc) when size(Value) >= 1 ->
  	AcctMultiSessionId = binary_to_list(Value),
  	[{?AcctMultiSessionId, AcctMultiSessionId} | Acc];
  attribute(?AcctLinkCount, Value, Acc) when size(Value) == 4 ->
  	AcctLinkCount = binary:decode_unsigned(Value),
  	[{?AcctLinkCount, AcctLinkCount} | Acc];
  attribute(?AcctInputGigawords, Value, Acc) when size(Value) == 4 ->
  	GigaWordsCount = binary:decode_unsigned(Value),
  	[{?AcctInputGigawords, GigaWordsCount} | Acc];
  attribute(?AcctOutputGigawords, Value, Acc) when size(Value) == 4 ->
  	GigaWordsCount = binary:decode_unsigned(Value),
  	[{?AcctOutputGigawords, GigaWordsCount} | Acc];
  attribute(?EventTimestamp, Value, Acc) when size(Value) == 4 ->
  	Seconds = binary:decode_unsigned(Value),
  	[{?EventTimestamp, Seconds} | Acc];
  attribute(?ChapChallenge, Value, Acc) when size(Value) >= 5 ->
  	ChapChallenge = binary_to_list(Value),
  	[{?ChapChallenge, ChapChallenge} | Acc];
  attribute(?NasPortType, Value, Acc) when size(Value) == 4 ->
  	NasPortType = binary:decode_unsigned(Value),
  	[{?NasPortType, NasPortType} | Acc];
  attribute(?PortLimit, Value, Acc) when size(Value) == 4 ->
  	PortLimit = binary:decode_unsigned(Value),
  	[{?PortLimit, PortLimit} | Acc];
  attribute(?LoginLatPort, Value, Acc) when size(Value) >= 1 ->
  	LoginLatPort = binary_to_list(Value),
  	[{?LoginLatPort, LoginLatPort} | Acc];
  attribute(?TunnelType, <<Tag, Value:24>>, Acc) ->
  	[{?TunnelType, {Tag, Value}} | Acc];
  attribute(?TunnelMediumType, <<Tag, Value:24>>, Acc) ->
  	[{?TunnelMediumType, {Tag, Value}} | Acc];
  attribute(?TunnelClientEndpoint, <<Tag, String/binary>>, Acc) ->
  	S = binary_to_list(String),
  	[{?TunnelClientEndpoint, {Tag, S}} | Acc];
  attribute(?TunnelServerEndpoint, <<Tag, String/binary>>, Acc) ->
  	S = binary_to_list(String),
  	[{?TunnelServerEndpoint, {Tag, S}} | Acc];
  attribute(?AcctTunnelConnection, Value, Acc) when size(Value) >= 1 ->
  	[{?AcctTunnelConnection, binary_to_list(Value)} | Acc];
  attribute(?TunnelPassword, <<Tag, Salt:16, String/binary>>, Acc) ->
  	S = binary_to_list(String),
  	[{?TunnelPassword, {Tag, Salt, S}} | Acc];
  attribute(?ARAPPassword, <<Challenge:8/binary, Response:8/binary>>, Acc) ->
  	[{?ARAPPassword, {Challenge, Response}} | Acc];
  attribute(?ARAPFeatures, <<Change, Length, Created:32, Expires:32, Time:32>>, Acc) ->
  	[{?ARAPFeatures, {Change, Length, Created, Expires, Time}} | Acc];
  attribute(?ARAPZoneAccess, Value, Acc) when size(Value) == 4 ->
  	ZoneAccess = binary:decode_unsigned(Value),
  	[{?ARAPZoneAccess, ZoneAccess} | Acc];
  attribute(?ARAPSecurity, Value, Acc) when size(Value) == 4 ->
  	Security = binary:decode_unsigned(Value),
  	[{?ARAPSecurity, Security} | Acc];
  attribute(?ARAPSecurityData, Data, Acc) when size(Data) >= 1 ->
  	[{?ARAPSecurityData, Data} | Acc];
  attribute(?PasswordRetry, Value, Acc) when size(Value) == 4 ->
  	Retries = binary:decode_unsigned(Value),
  	[{?PasswordRetry, Retries} | Acc];
  attribute(?Prompt, <<0:32>>, Acc) ->
  	[{?Prompt, false} | Acc];
  attribute(?Prompt, <<1:32>>, Acc) ->
  	[{?Prompt, true} | Acc];
  attribute(?ConnectInfo, Value, Acc) when size(Value) >= 1 ->
  	Text = binary_to_list(Value),
  	[{?ConnectInfo, Text} | Acc];
  attribute(?ConfigurationToken, Value, Acc) when size(Value) >= 1 ->
  	String= binary_to_list(Value),
  	[{?ConfigurationToken, String} | Acc];
  attribute(?EAPMessage, Data, Acc) when size(Data) >= 1 ->
  	[{?EAPMessage, Data} | Acc];
  attribute(?MessageAuthenticator, String, Acc) when size(String) == 16 ->
  	[{?MessageAuthenticator, String} | Acc];
  attribute(?TunnelPrivateGroupID, <<Tag, String/binary>>, Acc) ->
  	S = binary_to_list(String),
  	[{?TunnelPrivateGroupID, {Tag, S}} | Acc];
  attribute(?TunnelAssignmentID, <<Tag, String/binary>>, Acc) ->
  	S = binary_to_list(String),
  	[{?TunnelAssignmentID, {Tag, S}} | Acc];
  attribute(?TunnelPreference, <<Tag, Value:24>>, Acc) ->
  	[{?TunnelPreference, {Tag, Value}} | Acc];
  attribute(?ARAPChallengeResponse, String, Acc) when size(String) == 8 ->
  	[{?ARAPChallengeResponse, String} | Acc];
  attribute(?AcctInterimInterval, Value, Acc) when size(Value) == 4 ->
  	Count = binary:decode_unsigned(Value),
  	[{?AcctInterimInterval, Count} | Acc];
  attribute(?AcctTunnelPacketsLost, Value, Acc) when size(Value) == 4 ->
  	Lost = binary:decode_unsigned(Value),
  	[{?AcctTunnelPacketsLost, Lost} | Acc];
  attribute(?NasPortId, Text, Acc) when size(Text) >= 1 ->
  	S = binary_to_list(Text),
  	[{?NasPortId, S} | Acc];
  attribute(?FramedPool, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?FramedPool, S} | Acc];
  attribute(?CUI, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?CUI, S} | Acc];
  attribute(?TunnelClientAuthID, <<Tag, String/binary>>, Acc) ->
  	S = binary_to_list(String),
  	[{?TunnelClientAuthID, {Tag, S}} | Acc];
  attribute(?TunnelServerAuthID, <<Tag, String/binary>>, Acc) ->
  	S = binary_to_list(String),
  	[{?TunnelServerAuthID, {Tag, S}} | Acc];
  attribute(?NasFilterRule, Data, Acc) when size(Data) >= 1 ->
  	[{?NasFilterRule, Data} | Acc];
  attribute(?OriginatingLineInfo, Value, Acc) when size(Value) == 2 ->
  	OLI = binary:decode_unsigned(Value),
  	[{?OriginatingLineInfo, OLI} | Acc];
  attribute(?NasIPv6Address, <<A:16, B:16, C:16, D:16,
  		E:16, F:16, G:16, H:16>>, Acc) ->
  	[{?NasIPv6Address, {A, B, C, D, E, F, G, H}} | Acc];
  attribute(?FramedInterfaceId, Value, Acc) when size(Value) == 8 ->
  	InterfaceID= binary_to_list(Value),
  	[{?FramedInterfaceId, InterfaceID} | Acc];
  attribute(?FramedIPv6Prefix, <<0, PrefixLength, Prefix/binary>>, Acc) ->
  	[{?FramedIPv6Prefix, {PrefixLength, Prefix}} | Acc];
  attribute(?LoginIPv6Host, <<A:16, B:16, C:16, D:16,
  		E:16, F:16, G:16, H:16>>, Acc) ->
  	[{?LoginIPv6Host, {A, B, C, D, E, F, G, H}} | Acc];
  attribute(?FramedIPv6Route, Text, Acc) when size(Text) >= 1 ->
  	S = binary_to_list(Text),
  	[{?FramedIPv6Route, S} | Acc];
  attribute(?FramedIPv6Pool, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?FramedIPv6Pool, S} | Acc];
  attribute(?ErrorCause, Value, Acc) when size(Value) == 4 ->
  	Cause = binary:decode_unsigned(Value),
  	[{?ErrorCause, Cause} | Acc];
  attribute(?EAPKeyName, Data, Acc) when size(Data) >= 1 ->
  	[{?EAPKeyName, Data} | Acc];
  attribute(?DigestResponse, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestResponse, S} | Acc];
  attribute(?DigestRealm, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestRealm, S} | Acc];
  attribute(?DigestNonce, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestNonce, S} | Acc];
  attribute(?DigestResponseAuth, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestResponseAuth, S} | Acc];
  attribute(?DigestNextnonce, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestNextnonce, S} | Acc];
  attribute(?DigestMethod, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestMethod, S} | Acc];
  attribute(?DigestURI, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestURI, S} | Acc];
  attribute(?DigestQop, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestQop, S} | Acc];
  attribute(?DigestAlgorithm, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestAlgorithm, S} | Acc];
  attribute(?DigestEntityBodyHash, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestEntityBodyHash, S} | Acc];
  attribute(?DigestCNonce, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestCNonce, S} | Acc];
  attribute(?DigestNonceCount, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestNonceCount, S} | Acc];
  attribute(?DigestUsername, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestUsername, S} | Acc];
  attribute(?DigestOpaque, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestOpaque, S} | Acc];
  attribute(?DigestAuthParam, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestAuthParam, S} | Acc];
  attribute(?DigestAKAAuts, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestAKAAuts, S} | Acc];
  attribute(?DigestDomain, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestDomain, S} | Acc];
  attribute(?DigestStale, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestStale, S} | Acc];
  attribute(?DigestHA1, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?DigestHA1, S} | Acc];
  attribute(?SIPAOR, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?SIPAOR, S} | Acc];
  attribute(?DelegatedIPv6Prefix, <<0, PrefixLength, Prefix/binary>>, Acc)
  		when size(Prefix) >= 4, size(Prefix) =< 20 ->
  	[{?DelegatedIPv6Prefix, {PrefixLength, Prefix}} | Acc];
  attribute(?MIP6FeatureVector, Value, Acc) when size(Value) == 4 ->
  	Caps = binary:decode_unsigned(Value),
  	[{?MIP6FeatureVector, Caps} | Acc];
  attribute(?MIP6HomeLinkPrefix, <<PrefixLength, Prefix:16/binary>>, Acc) ->
  	[{?MIP6HomeLinkPrefix, {PrefixLength, Prefix}} | Acc];
  attribute(?OperatorName, <<NameSpaceId, Text/binary>>, Acc) ->
  	OperatorName = binary_to_list(Text),
  	[{?OperatorName, {NameSpaceId, OperatorName}} | Acc];
  attribute(?LocationInformation, <<Index:16, Code:8, Entity:8,
  		SightingTime:64, TimeToLive:64, Method/binary>>, Acc) when size(Method) >= 1 ->
  	S = binary_to_list(Method),
  	[{?LocationInformation, {Index, Code, Entity, SightingTime,
  			TimeToLive, S}} | Acc];
  attribute(?LocationData, <<Index:16, Location/binary>>, Acc)
  		when size(Location) >= 1 ->
  	[{?LocationData, {Index, Location}} | Acc];
  attribute(?BasicLocationPolicyRules, <<Flags:16, RetentionExpires:64/binary,
  		NoteWell/binary>>, Acc) ->
  	S = binary_to_list(NoteWell),
  	[{?BasicLocationPolicyRules, {Flags, RetentionExpires, S}} | Acc];
  attribute(?ExtendedLocationPolicyRules, String, Acc) when size(String) >= 1 ->
  	RulesReference = binary_to_list(String),
  	[{?ExtendedLocationPolicyRules, RulesReference} | Acc];
  attribute(?LocationCapable, Value, Acc) when size(Value) == 4 ->
  	Caps = binary:decode_unsigned(Value),
  	[{?LocationCapable, Caps} | Acc];
  attribute(?RequestedLocationInfo, Value, Acc) when size(Value) == 4 ->
  	Caps = binary:decode_unsigned(Value),
  	[{?RequestedLocationInfo, Caps} | Acc];
  attribute(?AllowedCalledStationId, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?AllowedCalledStationId, S} | Acc];
  attribute(?EAPPeerId, Data, Acc) when size(Data) >= 1 ->
  	[{?EAPPeerId, Data} | Acc];
  attribute(?EAPServerId, Data, Acc) when size(Data) >= 1 ->
  	[{?EAPServerId, Data} | Acc];
  attribute(?MobilityDomainId, <<_:16, MDID:16>>, Acc) ->
  	[{?MobilityDomainId, MDID} | Acc];
  attribute(?PreauthTimeout, Value, Acc) when size(Value) == 4 ->
  	Seconds = binary:decode_unsigned(Value),
  	[{?PreauthTimeout, Seconds} | Acc];
  attribute(?NetworkIdName, Data, Acc) when size(Data) >= 1 ->
  	[{?NetworkIdName, Data} | Acc];
  attribute(?EAPoLAnnouncement, Data, Acc) when size(Data) >= 1 ->
  	[{?EAPoLAnnouncement, Data} | Acc];
  attribute(?WLANHESSID, String, Acc) when size(String) == 17 ->
  	S = binary_to_list(String),
  	[{?WLANHESSID, S} | Acc];
  attribute(?WLANVenueInfo, <<0:16, VenueGroup, VenueType>>, Acc) ->
  	[{?WLANVenueInfo, {VenueGroup, VenueType}} | Acc];
  attribute(?WLANVenueLanguage, String, Acc)
  		when size(String) == 4, size(String) == 5 ->
  	Language  = binary_to_list(String),
  	[{?WLANVenueLanguage, Language} | Acc];
  attribute(?WLANVenueName, String, Acc) when size(String) >= 1 ->
  	S = binary_to_list(String),
  	[{?WLANVenueName, S} | Acc];
  attribute(?WLANReasonCode, Value, Acc) when size(Value) == 4 ->
  	Code = binary:decode_unsigned(Value),
  	[{?WLANReasonCode, Code} | Acc];
  attribute(?WLANPairwiseCipher, <<OUI:24, SuiteType:8>>, Acc) ->
  	[{?WLANPairwiseCipher, {OUI, SuiteType}} | Acc];
  attribute(?WLANGroupCipher, <<OUI:24, SuiteType:8>>, Acc) ->
  	[{?WLANGroupCipher, {OUI, SuiteType}} | Acc];
  attribute(?WLANAKMSuite, <<OUI:24, SuiteType:8>>, Acc) ->
  	[{?WLANAKMSuite, {OUI, SuiteType}} | Acc];
  attribute(?WLANGroupMgmtCipher, <<OUI:24, SuiteType:8>>, Acc) ->
  	[{?WLANGroupMgmtCipher, {OUI, SuiteType}} | Acc];
  attribute(?WLANRFBand, <<_:24, RfBand:8>>, Acc) ->
  	[{?WLANRFBand, RfBand} | Acc];
  attribute(_, _Value, Acc) ->
  	Acc.
  
  