/* Description: Query @sk to see if there is a CIPSO option attached to the sock and if there is return the CIPSO security attributes in @secattr. This function requires that @sk be locked, or privately held, but it does not do any locking itself. Returns zero on success and negative values on failure.  */
int cipso_v4_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr)
/* Description: Query @sk to see if there is a CIPSO option attached to the sock and if there is return the CIPSO security attributes in @secattr. This function requires that @sk be locked, or privately held, but it does not do any locking itself. Returns zero on success and negative values on failure.  */
int cipso_v4_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr)
{
	struct ip_options *opt;
	opt = inet_sk(sk)->opt;
	if (opt == NULL || opt->cipso == 0)
		return -ENOMSG;
	return cipso_v4_getattr(opt->__data + opt->cipso - sizeof(struct iphdr),
				secattr);
}